-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #50760 - petrochenkov:legimp, r=nikomatsakis
Turn deprecation lint `legacy_imports` into a hard error Closes #38260 The lint was introduced in Dec 2016, then made deny-by-default in Jun 2017 when crater run found 0 regressions caused by it. This lint requires some not entirely trivial amount of import resolution logic that (surprisingly or not) interacts with `feature(use_extern_macros)` (#35896), so it would be desirable to remove it before stabilizing `use_extern_macros`. In particular, this PR fixes the failing example in #50725 (but not the whole issue, `use std::panic::{self}` still can cause other undesirable errors when `use_extern_macros` is enabled).
- Loading branch information
Showing
9 changed files
with
35 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
error: `Foo` is ambiguous | ||
--> $DIR/rfc-1560-warning-cycle.rs:21:17 | ||
error[E0659]: `Foo` is ambiguous | ||
--> $DIR/rfc-1560-warning-cycle.rs:19:17 | ||
| | ||
LL | use *; | ||
| - `Foo` could refer to the name imported here | ||
LL | use bar::*; | ||
| ------ `Foo` could also refer to the name imported here | ||
LL | fn f(_: Foo) {} | ||
LL | fn f(_: Foo) {} //~ ERROR `Foo` is ambiguous | ||
| ^^^ | ||
| | ||
= note: #[deny(legacy_imports)] on by default | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #38260 <https://github.com/rust-lang/rust/issues/38260> | ||
note: `Foo` could refer to the name imported here | ||
--> $DIR/rfc-1560-warning-cycle.rs:17:13 | ||
| | ||
LL | use *; | ||
| ^ | ||
note: `Foo` could also refer to the name imported here | ||
--> $DIR/rfc-1560-warning-cycle.rs:18:13 | ||
| | ||
LL | use bar::*; | ||
| ^^^^^^ | ||
= note: consider adding an explicit import of `Foo` to disambiguate | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |