Commit fc6a50a
authored
Rollup merge of rust-lang#40509 - jseyfried:duplicate_check_macro_exports, r=nrc
Forbid conflicts between macros 1.0 exports and macros 2.0 exports
This PR forbids for conflicts between `#[macro_export]`/`#[macro_reexport]` macro exports and `pub use` macro exports. For example,
```rust
// crate A:
pub use macros::foo;
//^ This is allowed today, will be forbidden by this PR.
// crate B:
extern crate A; // This triggers a confusing error today.
use A::foo; // This could refer to refer to either macro export in crate A.
```
r? @nrcFile tree
6 files changed
+45
-20
lines changed- src
- librustc_metadata
- librustc_resolve
- librustc/hir
- test/compile-fail
6 files changed
+45
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
| 686 | + | |
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| |||
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
| 723 | + | |
723 | 724 | | |
724 | 725 | | |
725 | 726 | | |
| |||
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| 736 | + | |
735 | 737 | | |
736 | 738 | | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
| 739 | + | |
741 | 740 | | |
742 | 741 | | |
743 | 742 | | |
744 | 743 | | |
745 | 744 | | |
746 | 745 | | |
747 | 746 | | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
| 747 | + | |
752 | 748 | | |
753 | 749 | | |
754 | 750 | | |
755 | 751 | | |
756 | 752 | | |
757 | 753 | | |
758 | 754 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
| 755 | + | |
763 | 756 | | |
764 | 757 | | |
765 | 758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
| 766 | + | |
766 | 767 | | |
767 | | - | |
768 | | - | |
769 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
770 | 771 | | |
771 | 772 | | |
772 | 773 | | |
| |||
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
789 | | - | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
790 | 801 | | |
791 | 802 | | |
792 | 803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments