about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_resolve/macros.rs29
-rw-r--r--src/libsyntax/feature_gate.rs7
-rw-r--r--src/test/run-pass/uniform-paths/auxiliary/issue-53691.rs2
-rw-r--r--src/test/run-pass/uniform-paths/basic-nested.rs18
-rw-r--r--src/test/run-pass/uniform-paths/basic.rs6
-rw-r--r--src/test/run-pass/uniform-paths/macros-nested.rs16
-rw-r--r--src/test/run-pass/uniform-paths/macros.rs16
-rw-r--r--src/test/run-pass/uniform-paths/same-crate.rs3
-rw-r--r--src/test/ui/editions/edition-imports-2015.rs2
-rw-r--r--src/test/ui/editions/edition-imports-2015.stderr2
-rw-r--r--src/test/ui/editions/edition-imports-virtual-2015-gated.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-uniform-paths.rs29
-rw-r--r--src/test/ui/feature-gates/feature-gate-uniform-paths.stderr50
-rw-r--r--src/test/ui/imports/issue-56125.rs2
-rw-r--r--src/test/ui/imports/issue-56125.stderr14
-rw-r--r--src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.rs2
-rw-r--r--src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr4
-rw-r--r--src/test/ui/rust-2018/future-proofing-locals.rs3
-rw-r--r--src/test/ui/rust-2018/local-path-suggestions-2018.rs2
-rw-r--r--src/test/ui/rust-2018/local-path-suggestions-2018.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs2
-rw-r--r--src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr6
-rw-r--r--src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs2
-rw-r--r--src/test/ui/rust-2018/uniform-paths/issue-54390.rs11
-rw-r--r--src/test/ui/rust-2018/uniform-paths/issue-54390.stderr32
-rw-r--r--src/test/ui/rust-2018/uniform-paths/macro-rules.rs3
-rw-r--r--src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs2
-rw-r--r--src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr14
-rw-r--r--src/test/ui/rust-2018/uniform-paths/prelude-fail.rs2
-rw-r--r--src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/prelude.rs2
31 files changed, 52 insertions, 243 deletions
diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs
index e0a275cb5a1..081891cc5ec 100644
--- a/src/librustc_resolve/macros.rs
+++ b/src/librustc_resolve/macros.rs
@@ -956,32 +956,23 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
             // but its `Def` should coincide with a crate passed with `--extern`
             // (otherwise there would be ambiguity) and we can skip feature error in this case.
             'ok: {
-                if !is_import || (!rust_2015 && self.session.features_untracked().uniform_paths) {
+                if !is_import || !rust_2015 {
                     break 'ok;
                 }
                 if ns == TypeNS && use_prelude && self.extern_prelude_get(ident, true).is_some() {
                     break 'ok;
                 }
-                if rust_2015 {
-                    let root_ident = Ident::new(keywords::CrateRoot.name(), orig_ident.span);
-                    let root_module = self.resolve_crate_root(root_ident);
-                    if self.resolve_ident_in_module_ext(ModuleOrUniformRoot::Module(root_module),
-                                                        orig_ident, ns, None, false, path_span)
-                                                        .is_ok() {
-                        break 'ok;
-                    }
+                let root_ident = Ident::new(keywords::PathRoot.name(), orig_ident.span);
+                let root_module = self.resolve_crate_root(root_ident);
+                if self.resolve_ident_in_module_ext(ModuleOrUniformRoot::Module(root_module),
+                                                    orig_ident, ns, None, false, path_span)
+                                                    .is_ok() {
+                    break 'ok;
                 }
 
-                let reason = if rust_2015 {
-                    "in macros originating from 2015 edition"
-                } else {
-                    "on stable channel"
-                };
-                let msg = format!("imports can only refer to extern crate names \
-                                   passed with `--extern` {}", reason);
-                let mut err = feature_err(&self.session.parse_sess, "uniform_paths",
-                                          ident.span, GateIssue::Language, &msg);
-
+                let msg = "imports can only refer to extern crate names passed with \
+                           `--extern` in macros originating from 2015 edition";
+                let mut err = self.session.struct_span_err(ident.span, msg);
                 let what = self.binding_description(binding, ident,
                                                     flags.contains(Flags::MISC_FROM_PRELUDE));
                 let note_msg = format!("this import refers to {what}", what = what);
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index fac7ff2bf34..8fd36a125cd 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -459,10 +459,7 @@ declare_features! (
     // Support for arbitrary delimited token streams in non-macro attributes
     (active, unrestricted_attribute_tokens, "1.30.0", Some(55208), None),
 
-    // Allows `use x::y;` to resolve through `self::x`, not just `::x`
-    (active, uniform_paths, "1.30.0", Some(53130), None),
-
-    // Allows unsized rvalues at arguments and parameters
+    // Allows unsized rvalues at arguments and parameters.
     (active, unsized_locals, "1.30.0", Some(48055), None),
 
     // #![test_runner]
@@ -689,6 +686,8 @@ declare_features! (
     (accepted, self_struct_ctor, "1.32.0", Some(51994), None),
     // `Self` in type definitions (RFC 2300)
     (accepted, self_in_typedefs, "1.32.0", Some(49303), None),
+    // Allows `use x::y;` to search `x` in the current scope.
+    (accepted, uniform_paths, "1.32.0", Some(53130), None),
 );
 
 // If you change this, please modify `src/doc/unstable-book` as well. You must
diff --git a/src/test/run-pass/uniform-paths/auxiliary/issue-53691.rs b/src/test/run-pass/uniform-paths/auxiliary/issue-53691.rs
index 5845afd72fb..86d0244cbc2 100644
--- a/src/test/run-pass/uniform-paths/auxiliary/issue-53691.rs
+++ b/src/test/run-pass/uniform-paths/auxiliary/issue-53691.rs
@@ -10,8 +10,6 @@
 
 // edition:2018
 
-#![feature(uniform_paths)]
-
 mod m { pub fn f() {} }
 mod n { pub fn g() {} }
 
diff --git a/src/test/run-pass/uniform-paths/basic-nested.rs b/src/test/run-pass/uniform-paths/basic-nested.rs
index a0256187dbb..bccd3eace8c 100644
--- a/src/test/run-pass/uniform-paths/basic-nested.rs
+++ b/src/test/run-pass/uniform-paths/basic-nested.rs
@@ -1,22 +1,12 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
+// This test is similar to `basic.rs`, but nested in modules.
 
 // run-pass
-#![allow(unused_imports)]
-#![allow(non_camel_case_types)]
-
 // edition:2018
 
-#![feature(decl_macro, uniform_paths)]
+#![feature(decl_macro)]
 
-// This test is similar to `basic.rs`, but nested in modules.
+#![allow(unused_imports)]
+#![allow(non_camel_case_types)]
 
 mod foo {
     // Test that ambiguity errors are not emitted between `self::test` and
diff --git a/src/test/run-pass/uniform-paths/basic.rs b/src/test/run-pass/uniform-paths/basic.rs
index b957b24d625..be74359752f 100644
--- a/src/test/run-pass/uniform-paths/basic.rs
+++ b/src/test/run-pass/uniform-paths/basic.rs
@@ -9,12 +9,10 @@
 // except according to those terms.
 
 // run-pass
-#![allow(unused_imports)]
-#![allow(non_camel_case_types)]
-
 // edition:2018
 
-#![feature(uniform_paths)]
+#![allow(unused_imports)]
+#![allow(non_camel_case_types)]
 
 // Test that ambiguity errors are not emitted between `self::test` and
 // `::test`, assuming the latter (crate) is not in `extern_prelude`.
diff --git a/src/test/run-pass/uniform-paths/macros-nested.rs b/src/test/run-pass/uniform-paths/macros-nested.rs
index 373734345fc..275105c5b3e 100644
--- a/src/test/run-pass/uniform-paths/macros-nested.rs
+++ b/src/test/run-pass/uniform-paths/macros-nested.rs
@@ -1,21 +1,9 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
+// This test is similar to `macros.rs`, but nested in modules.
 
 // run-pass
-#![allow(non_camel_case_types)]
-
 // edition:2018
 
-#![feature(uniform_paths)]
-
-// This test is similar to `macros.rs`, but nested in modules.
+#![allow(non_camel_case_types)]
 
 mod foo {
     // Test that ambiguity errors are not emitted between `self::test` and
diff --git a/src/test/run-pass/uniform-paths/macros.rs b/src/test/run-pass/uniform-paths/macros.rs
index 20984eb13dd..31b809f0cfd 100644
--- a/src/test/run-pass/uniform-paths/macros.rs
+++ b/src/test/run-pass/uniform-paths/macros.rs
@@ -1,21 +1,9 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
+// This test is similar to `basic.rs`, but with macros defining local items.
 
 // run-pass
-#![allow(non_camel_case_types)]
-
 // edition:2018
 
-#![feature(uniform_paths)]
-
-// This test is similar to `basic.rs`, but with macros defining local items.
+#![allow(non_camel_case_types)]
 
 // Test that ambiguity errors are not emitted between `self::test` and
 // `::test`, assuming the latter (crate) is not in `extern_prelude`.
diff --git a/src/test/run-pass/uniform-paths/same-crate.rs b/src/test/run-pass/uniform-paths/same-crate.rs
index bb15d6d53ac..307a80ac99a 100644
--- a/src/test/run-pass/uniform-paths/same-crate.rs
+++ b/src/test/run-pass/uniform-paths/same-crate.rs
@@ -9,11 +9,8 @@
 // except according to those terms.
 
 // run-pass
-
 // edition:2018
 
-#![feature(uniform_paths)]
-
 pub const A: usize = 0;
 
 pub mod foo {
diff --git a/src/test/ui/editions/edition-imports-2015.rs b/src/test/ui/editions/edition-imports-2015.rs
index b89ca28e279..5ba45b19dde 100644
--- a/src/test/ui/editions/edition-imports-2015.rs
+++ b/src/test/ui/editions/edition-imports-2015.rs
@@ -3,8 +3,6 @@
 // aux-build:edition-imports-2018.rs
 // aux-build:absolute.rs
 
-#![feature(uniform_paths)]
-
 #[macro_use]
 extern crate edition_imports_2018;
 
diff --git a/src/test/ui/editions/edition-imports-2015.stderr b/src/test/ui/editions/edition-imports-2015.stderr
index fb6b2e64ef5..816ab21d814 100644
--- a/src/test/ui/editions/edition-imports-2015.stderr
+++ b/src/test/ui/editions/edition-imports-2015.stderr
@@ -1,5 +1,5 @@
 error: cannot glob-import all possible crates
-  --> $DIR/edition-imports-2015.rs:25:5
+  --> $DIR/edition-imports-2015.rs:23:5
    |
 LL |     gen_glob!(); //~ ERROR cannot glob-import all possible crates
    |     ^^^^^^^^^^^^
diff --git a/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr b/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr
index 3cf967dbf70..7c78fbb26a1 100644
--- a/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr
+++ b/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr
@@ -1,4 +1,4 @@
-error[E0658]: imports can only refer to extern crate names passed with `--extern` in macros originating from 2015 edition (see issue #53130)
+error: imports can only refer to extern crate names passed with `--extern` in macros originating from 2015 edition
   --> <::edition_imports_2015::gen_gated macros>:1:50
    |
 LL | (  ) => { fn check_gated (  ) { enum E { A } use E :: * ; } }
@@ -9,7 +9,6 @@ LL | (  ) => { fn check_gated (  ) { enum E { A } use E :: * ; } }
 LL |     gen_gated!();
    |     ------------- not an extern crate passed with `--extern`
    |
-   = help: add #![feature(uniform_paths)] to the crate attributes to enable
 note: this import refers to the enum defined here
   --> $DIR/edition-imports-virtual-2015-gated.rs:9:5
    |
@@ -19,4 +18,3 @@ LL |     gen_gated!();
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-uniform-paths.rs b/src/test/ui/feature-gates/feature-gate-uniform-paths.rs
deleted file mode 100644
index ca1cc1d2fd0..00000000000
--- a/src/test/ui/feature-gates/feature-gate-uniform-paths.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// edition:2018
-
-pub mod foo {
-    pub use bar::Bar; //~ ERROR imports can only refer to extern crate names
-
-    pub mod bar {
-        pub struct Bar;
-    }
-}
-
-use inline; //~ ERROR imports can only refer to extern crate names
-
-use Vec; //~ ERROR imports can only refer to extern crate names
-
-use vec; //~ ERROR imports can only refer to extern crate names
-
-fn main() {
-    let _ = foo::Bar;
-}
diff --git a/src/test/ui/feature-gates/feature-gate-uniform-paths.stderr b/src/test/ui/feature-gates/feature-gate-uniform-paths.stderr
deleted file mode 100644
index 0631f2c355f..00000000000
--- a/src/test/ui/feature-gates/feature-gate-uniform-paths.stderr
+++ /dev/null
@@ -1,50 +0,0 @@
-error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
-  --> $DIR/feature-gate-uniform-paths.rs:14:13
-   |
-LL |       pub use bar::Bar; //~ ERROR imports can only refer to extern crate names
-   |               ^^^
-LL | 
-LL | /     pub mod bar {
-LL | |         pub struct Bar;
-LL | |     }
-   | |_____- not an extern crate passed with `--extern`
-   |
-   = help: add #![feature(uniform_paths)] to the crate attributes to enable
-note: this import refers to the module defined here
-  --> $DIR/feature-gate-uniform-paths.rs:16:5
-   |
-LL | /     pub mod bar {
-LL | |         pub struct Bar;
-LL | |     }
-   | |_____^
-
-error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
-  --> $DIR/feature-gate-uniform-paths.rs:21:5
-   |
-LL | use inline; //~ ERROR imports can only refer to extern crate names
-   |     ^^^^^^ not an extern crate passed with `--extern`
-   |
-   = help: add #![feature(uniform_paths)] to the crate attributes to enable
-   = note: this import refers to a built-in attribute
-
-error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
-  --> $DIR/feature-gate-uniform-paths.rs:23:5
-   |
-LL | use Vec; //~ ERROR imports can only refer to extern crate names
-   |     ^^^ not an extern crate passed with `--extern`
-   |
-   = help: add #![feature(uniform_paths)] to the crate attributes to enable
-   = note: this import refers to a struct from prelude
-
-error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
-  --> $DIR/feature-gate-uniform-paths.rs:25:5
-   |
-LL | use vec; //~ ERROR imports can only refer to extern crate names
-   |     ^^^ not an extern crate passed with `--extern`
-   |
-   = help: add #![feature(uniform_paths)] to the crate attributes to enable
-   = note: this import refers to a macro from prelude
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/imports/issue-56125.rs b/src/test/ui/imports/issue-56125.rs
index 843b52f1843..b4963e480a6 100644
--- a/src/test/ui/imports/issue-56125.rs
+++ b/src/test/ui/imports/issue-56125.rs
@@ -2,8 +2,6 @@
 // compile-flags:--extern issue_56125
 // aux-build:issue-56125.rs
 
-#![feature(uniform_paths)]
-
 mod m1 {
     use issue_56125::last_segment::*;
     //~^ ERROR `issue_56125` is ambiguous
diff --git a/src/test/ui/imports/issue-56125.stderr b/src/test/ui/imports/issue-56125.stderr
index 72d6041765e..2011184cbc3 100644
--- a/src/test/ui/imports/issue-56125.stderr
+++ b/src/test/ui/imports/issue-56125.stderr
@@ -11,13 +11,13 @@ LL |     use issue_56125::last_segment::*;
    |                      ^^^^^^^^^^^^ could not find `last_segment` in `issue_56125`
 
 error[E0432]: unresolved import `empty::issue_56125`
-  --> $DIR/issue-56125.rs:21:9
+  --> $DIR/issue-56125.rs:17:9
    |
 LL |     use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
    |         ^^^^^^^^^^^^^^^^^^ no `issue_56125` in `m3::empty`
 
 error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
-  --> $DIR/issue-56125.rs:8:9
+  --> $DIR/issue-56125.rs:6:9
    |
 LL |     use issue_56125::last_segment::*;
    |         ^^^^^^^^^^^ ambiguous name
@@ -25,14 +25,14 @@ LL |     use issue_56125::last_segment::*;
    = note: `issue_56125` could refer to an extern crate passed with `--extern`
    = help: use `::issue_56125` to refer to this extern crate unambiguously
 note: `issue_56125` could also refer to the module imported here
-  --> $DIR/issue-56125.rs:8:9
+  --> $DIR/issue-56125.rs:6:9
    |
 LL |     use issue_56125::last_segment::*;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: use `self::issue_56125` to refer to this module unambiguously
 
 error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
-  --> $DIR/issue-56125.rs:14:9
+  --> $DIR/issue-56125.rs:11:9
    |
 LL |     use issue_56125::non_last_segment::non_last_segment::*;
    |         ^^^^^^^^^^^ ambiguous name
@@ -40,14 +40,14 @@ LL |     use issue_56125::non_last_segment::non_last_segment::*;
    = note: `issue_56125` could refer to an extern crate passed with `--extern`
    = help: use `::issue_56125` to refer to this extern crate unambiguously
 note: `issue_56125` could also refer to the module imported here
-  --> $DIR/issue-56125.rs:14:9
+  --> $DIR/issue-56125.rs:11:9
    |
 LL |     use issue_56125::non_last_segment::non_last_segment::*;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: use `self::issue_56125` to refer to this module unambiguously
 
 error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
-  --> $DIR/issue-56125.rs:22:9
+  --> $DIR/issue-56125.rs:18:9
    |
 LL |     use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
    |         ^^^^^^^^^^^ ambiguous name
@@ -55,7 +55,7 @@ LL |     use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
    = note: `issue_56125` could refer to an extern crate passed with `--extern`
    = help: use `::issue_56125` to refer to this extern crate unambiguously
 note: `issue_56125` could also refer to the module imported here
-  --> $DIR/issue-56125.rs:22:9
+  --> $DIR/issue-56125.rs:17:9
    |
 LL |     use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
    |         ^^^^^^^^^^^^^^
diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.rs b/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.rs
index bfe7e4da845..92541afc0c1 100644
--- a/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.rs
+++ b/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.rs
@@ -10,8 +10,6 @@
 
 // edition:2018
 
-#![feature(uniform_paths)]
-
 // Tests that arbitrary crates (other than `core`, `std` and `meta`)
 // aren't allowed without `--extern`, even if they're in the sysroot.
 use alloc; //~ ERROR unresolved import `alloc`
diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr
index 06c11b894dd..3bea7816b30 100644
--- a/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr
+++ b/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr
@@ -1,11 +1,11 @@
 error: cannot import a built-in macro
-  --> $DIR/not-whitelisted.rs:18:5
+  --> $DIR/not-whitelisted.rs:6:5
    |
 LL | use test; //~ ERROR cannot import a built-in macro
    |     ^^^^
 
 error[E0432]: unresolved import `alloc`
-  --> $DIR/not-whitelisted.rs:17:5
+  --> $DIR/not-whitelisted.rs:5:5
    |
 LL | use alloc; //~ ERROR unresolved import `alloc`
    |     ^^^^^ no `alloc` external crate
diff --git a/src/test/ui/rust-2018/future-proofing-locals.rs b/src/test/ui/rust-2018/future-proofing-locals.rs
index d2e6dbbb954..85a122ba11b 100644
--- a/src/test/ui/rust-2018/future-proofing-locals.rs
+++ b/src/test/ui/rust-2018/future-proofing-locals.rs
@@ -1,6 +1,7 @@
 // edition:2018
 
-#![feature(uniform_paths, underscore_imports)]
+#![feature(underscore_imports)]
+#![allow(non_camel_case_types)]
 
 mod T {
     pub struct U;
diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.rs b/src/test/ui/rust-2018/local-path-suggestions-2018.rs
index 0d4aefff931..53c92e1c205 100644
--- a/src/test/ui/rust-2018/local-path-suggestions-2018.rs
+++ b/src/test/ui/rust-2018/local-path-suggestions-2018.rs
@@ -12,8 +12,6 @@
 // compile-flags:--extern baz
 // edition:2018
 
-#![feature(uniform_paths)]
-
 mod foo {
     pub type Bar = u32;
 }
diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr
index a445a4c612b..71c8289264f 100644
--- a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr
+++ b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `foo`
-  --> $DIR/local-path-suggestions-2018.rs:22:9
+  --> $DIR/local-path-suggestions-2018.rs:10:9
    |
 LL |     use foo::Bar; //~ ERROR unresolved import `foo`
    |         ^^^ did you mean `crate::foo`?
@@ -7,7 +7,7 @@ LL |     use foo::Bar; //~ ERROR unresolved import `foo`
    = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>
 
 error[E0432]: unresolved import `foobar`
-  --> $DIR/local-path-suggestions-2018.rs:31:5
+  --> $DIR/local-path-suggestions-2018.rs:19:5
    |
 LL | use foobar::Baz; //~ ERROR unresolved import `foobar`
    |     ^^^^^^ did you mean `baz::foobar`?
diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs
index 19be7dc9640..3f5897901a0 100644
--- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs
+++ b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs
@@ -1,7 +1,5 @@
 // edition:2018
 
-#![feature(uniform_paths)]
-
 mod my {
     pub mod sub {
         pub fn bar() {}
diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr
index 0088296b1a4..4a01ba5088f 100644
--- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr
@@ -1,16 +1,16 @@
 error[E0659]: `sub` is ambiguous (name vs any other name during import resolution)
-  --> $DIR/block-scoped-shadow-nested.rs:18:13
+  --> $DIR/block-scoped-shadow-nested.rs:16:13
    |
 LL |         use sub::bar; //~ ERROR `sub` is ambiguous
    |             ^^^ ambiguous name
    |
 note: `sub` could refer to the module imported here
-  --> $DIR/block-scoped-shadow-nested.rs:16:9
+  --> $DIR/block-scoped-shadow-nested.rs:14:9
    |
 LL |     use my::sub;
    |         ^^^^^^^
 note: `sub` could also refer to the module defined here
-  --> $DIR/block-scoped-shadow-nested.rs:11:1
+  --> $DIR/block-scoped-shadow-nested.rs:9:1
    |
 LL | / mod sub {
 LL | |     pub fn bar() {}
diff --git a/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs b/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs
index a7bc625bbf0..0c2da1884b7 100644
--- a/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs
+++ b/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs
@@ -1,8 +1,6 @@
 // compile-pass
 // edition:2018
 
-#![feature(uniform_paths)]
-
 fn main() {
     enum E { A, B, C }
 
diff --git a/src/test/ui/rust-2018/uniform-paths/issue-54390.rs b/src/test/ui/rust-2018/uniform-paths/issue-54390.rs
deleted file mode 100644
index 536cc25e35a..00000000000
--- a/src/test/ui/rust-2018/uniform-paths/issue-54390.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// edition:2018
-
-#![deny(unused)]
-
-use std::fmt;
-
-// No "unresolved import" + "unused import" combination here.
-use fmt::Write; //~ ERROR imports can only refer to extern crate names
-                //~| ERROR unused import: `fmt::Write`
-
-fn main() {}
diff --git a/src/test/ui/rust-2018/uniform-paths/issue-54390.stderr b/src/test/ui/rust-2018/uniform-paths/issue-54390.stderr
deleted file mode 100644
index 8f86698c9c1..00000000000
--- a/src/test/ui/rust-2018/uniform-paths/issue-54390.stderr
+++ /dev/null
@@ -1,32 +0,0 @@
-error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
-  --> $DIR/issue-54390.rs:8:5
-   |
-LL | use std::fmt;
-   |     -------- not an extern crate passed with `--extern`
-...
-LL | use fmt::Write; //~ ERROR imports can only refer to extern crate names
-   |     ^^^
-   |
-   = help: add #![feature(uniform_paths)] to the crate attributes to enable
-note: this import refers to the module imported here
-  --> $DIR/issue-54390.rs:5:5
-   |
-LL | use std::fmt;
-   |     ^^^^^^^^
-
-error: unused import: `fmt::Write`
-  --> $DIR/issue-54390.rs:8:5
-   |
-LL | use fmt::Write; //~ ERROR imports can only refer to extern crate names
-   |     ^^^^^^^^^^
-   |
-note: lint level defined here
-  --> $DIR/issue-54390.rs:3:9
-   |
-LL | #![deny(unused)]
-   |         ^^^^^^
-   = note: #[deny(unused_imports)] implied by #[deny(unused)]
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/rust-2018/uniform-paths/macro-rules.rs b/src/test/ui/rust-2018/uniform-paths/macro-rules.rs
index bd098616aa9..dcf1f2b4b7e 100644
--- a/src/test/ui/rust-2018/uniform-paths/macro-rules.rs
+++ b/src/test/ui/rust-2018/uniform-paths/macro-rules.rs
@@ -1,6 +1,6 @@
 // edition:2018
 
-#![feature(underscore_imports, decl_macro, uniform_paths)]
+#![feature(underscore_imports, decl_macro)]
 
 mod m1 {
     // Non-exported legacy macros are treated as `pub(crate)`.
@@ -14,6 +14,7 @@ mod m1 {
 mod m2 {
     macro_rules! legacy_macro { () => () }
 
+    #[allow(non_camel_case_types)]
     type legacy_macro = u8;
 
     // Legacy macro imports don't prevent names from other namespaces from being imported.
diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs
index e153e868b31..541fc1be4e8 100644
--- a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs
+++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs
@@ -1,7 +1,5 @@
 // edition:2018
 
-#![feature(uniform_paths)]
-
 // Built-in attribute
 use inline as imported_inline;
 mod builtin {
diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr
index 4c49cd89bdc..40b8fcf7158 100644
--- a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr
@@ -1,41 +1,41 @@
 error: cannot use a built-in attribute through an import
-  --> $DIR/prelude-fail-2.rs:17:3
+  --> $DIR/prelude-fail-2.rs:15:3
    |
 LL | #[imported_inline] //~ ERROR cannot use a built-in attribute through an import
    |   ^^^^^^^^^^^^^^^
    |
 note: the built-in attribute imported here
-  --> $DIR/prelude-fail-2.rs:6:5
+  --> $DIR/prelude-fail-2.rs:4:5
    |
 LL | use inline as imported_inline;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot use a built-in attribute through an import
-  --> $DIR/prelude-fail-2.rs:18:3
+  --> $DIR/prelude-fail-2.rs:16:3
    |
 LL | #[builtin::imported_inline] //~ ERROR cannot use a built-in attribute through an import
    |   ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot use a tool module through an import
-  --> $DIR/prelude-fail-2.rs:19:3
+  --> $DIR/prelude-fail-2.rs:17:3
    |
 LL | #[imported_rustfmt::skip] //~ ERROR cannot use a tool module through an import
    |   ^^^^^^^^^^^^^^^^
    |
 note: the tool module imported here
-  --> $DIR/prelude-fail-2.rs:12:5
+  --> $DIR/prelude-fail-2.rs:10:5
    |
 LL | use rustfmt as imported_rustfmt;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot use a tool module through an import
-  --> $DIR/prelude-fail-2.rs:20:13
+  --> $DIR/prelude-fail-2.rs:18:13
    |
 LL | #[tool_mod::imported_rustfmt::skip] //~ ERROR cannot use a tool module through an import
    |             ^^^^^^^^^^^^^^^^
    |
 note: the tool module imported here
-  --> $DIR/prelude-fail-2.rs:14:13
+  --> $DIR/prelude-fail-2.rs:12:13
    |
 LL |     pub use rustfmt as imported_rustfmt;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs b/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs
index c5bd50f2f56..d717884c901 100644
--- a/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs
+++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs
@@ -1,7 +1,5 @@
 // edition:2018
 
-#![feature(uniform_paths)]
-
 // Built-in macro
 use env as env_imported; //~ ERROR cannot import a built-in macro
 
diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr
index 794d986b82e..fdfea416b12 100644
--- a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr
@@ -1,11 +1,11 @@
 error: cannot import a built-in macro
-  --> $DIR/prelude-fail.rs:6:5
+  --> $DIR/prelude-fail.rs:4:5
    |
 LL | use env as env_imported; //~ ERROR cannot import a built-in macro
    |     ^^^^^^^^^^^^^^^^^^^
 
 error[E0432]: unresolved import `rustfmt`
-  --> $DIR/prelude-fail.rs:9:5
+  --> $DIR/prelude-fail.rs:7:5
    |
 LL | use rustfmt::skip as imported_rustfmt_skip; //~ ERROR unresolved import `rustfmt`
    |     ^^^^^^^ not a module `rustfmt`
diff --git a/src/test/ui/rust-2018/uniform-paths/prelude.rs b/src/test/ui/rust-2018/uniform-paths/prelude.rs
index 1a6027f30d7..9a326b4c728 100644
--- a/src/test/ui/rust-2018/uniform-paths/prelude.rs
+++ b/src/test/ui/rust-2018/uniform-paths/prelude.rs
@@ -1,8 +1,6 @@
 // compile-pass
 // edition:2018
 
-#![feature(uniform_paths)]
-
 // Macro imported with `#[macro_use] extern crate`
 use vec as imported_vec;