diff options
| author | bors <bors@rust-lang.org> | 2018-05-19 12:16:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-19 12:16:50 +0000 |
| commit | ef8ee647749ad2f0acf235aaf18debacb974a048 (patch) | |
| tree | bdd3be45c4dac19d76ea672a8d91cbe41ed17a96 /src/doc | |
| parent | c95e1cccc9c248789230a54ecfd87971a04d5c0c (diff) | |
| parent | d1b027421edb0c559ed0840174b83dfa3bcab7ce (diff) | |
Auto merge of #50760 - petrochenkov:legimp, r=nikomatsakis
Turn deprecation lint `legacy_imports` into a hard error
Closes https://github.com/rust-lang/rust/issues/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)` (https://github.com/rust-lang/rust/issues/35896), so it would be desirable to remove it before stabilizing `use_extern_macros`.
In particular, this PR fixes the failing example in https://github.com/rust-lang/rust/issues/50725 (but not the whole issue, `use std::panic::{self}` still can cause other undesirable errors when `use_extern_macros` is enabled).
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustc/src/lints/listing/deny-by-default.md | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/doc/rustc/src/lints/listing/deny-by-default.md b/src/doc/rustc/src/lints/listing/deny-by-default.md index ef76295f04d..3a85a40fd1f 100644 --- a/src/doc/rustc/src/lints/listing/deny-by-default.md +++ b/src/doc/rustc/src/lints/listing/deny-by-default.md @@ -91,43 +91,6 @@ The legacy_directory_ownership warning is issued when The warning can be fixed by renaming the parent module to "mod.rs" and moving it into its own directory if appropriate. -## legacy-imports - -This lint detects names that resolve to ambiguous glob imports. Some example -code that triggers this lint: - -```rust,ignore -pub struct Foo; - -mod bar { - struct Foo; - - mod baz { - use *; - use bar::*; - fn f(_: Foo) {} - } -} -``` - -This will produce: - -```text -error: `Foo` is ambiguous - --> src/main.rs:9:17 - | -7 | use *; - | - `Foo` could refer to the name imported here -8 | use bar::*; - | ------ `Foo` could also refer to the name imported here -9 | fn f(_: Foo) {} - | ^^^ - | - = 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> -``` - ## missing-fragment-specifier |
