Fix rebase
diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs
index 081891c..31c2db5 100644
--- a/src/librustc_resolve/macros.rs
+++ b/src/librustc_resolve/macros.rs
@@ -962,7 +962,7 @@
if ns == TypeNS && use_prelude && self.extern_prelude_get(ident, true).is_some() {
break 'ok;
}
- let root_ident = Ident::new(keywords::PathRoot.name(), orig_ident.span);
+ 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)
diff --git a/src/test/ui/imports/issue-56125.stderr b/src/test/ui/imports/issue-56125.stderr
index 0a93b2f..a6e45a5 100644
--- a/src/test/ui/imports/issue-56125.stderr
+++ b/src/test/ui/imports/issue-56125.stderr
@@ -1,17 +1,17 @@
error[E0433]: failed to resolve: could not find `non_last_segment` in `issue_56125`
- --> $DIR/issue-56125.rs:14:22
+ --> $DIR/issue-56125.rs:12:22
|
LL | use issue_56125::non_last_segment::non_last_segment::*;
| ^^^^^^^^^^^^^^^^ could not find `non_last_segment` in `issue_56125`
error[E0432]: unresolved import `issue_56125::last_segment`
- --> $DIR/issue-56125.rs:8:22
+ --> $DIR/issue-56125.rs:6:22
|
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:17:9
+ --> $DIR/issue-56125.rs:19:9
|
LL | use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
| ^^^^^^^^^^^^^^^^^^ no `issue_56125` in `m3::empty`
@@ -32,7 +32,7 @@
= 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:11:9
+ --> $DIR/issue-56125.rs:12:9
|
LL | use issue_56125::non_last_segment::non_last_segment::*;
| ^^^^^^^^^^^ ambiguous name
@@ -40,14 +40,14 @@
= 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:11:9
+ --> $DIR/issue-56125.rs:12: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:18:9
+ --> $DIR/issue-56125.rs:20:9
|
LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
| ^^^^^^^^^^^ ambiguous name
@@ -55,7 +55,7 @@
= 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:18:9
+ --> $DIR/issue-56125.rs:20:9
|
LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
| ^^^^^^^^^^^^^^
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.rs b/src/test/ui/proc-macro/derive-helper-shadowing.rs
index f6fe9f9..d4a0721 100644
--- a/src/test/ui/proc-macro/derive-helper-shadowing.rs
+++ b/src/test/ui/proc-macro/derive-helper-shadowing.rs
@@ -16,11 +16,6 @@
#[my_attr]
struct U;
- mod inner {
- #[my_attr] //~ ERROR attribute `my_attr` is currently unknown
- struct V;
- }
-
0
}]
}
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
index 8180c84..cc50fef 100644
--- a/src/test/ui/proc-macro/derive-helper-shadowing.stderr
+++ b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
@@ -1,11 +1,3 @@
-error[E0658]: The attribute `my_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
- --> $DIR/derive-helper-shadowing.rs:20:15
- |
-LL | #[my_attr] //~ ERROR attribute `my_attr` is currently unknown
- | ^^^^^^^
- |
- = help: add #![feature(custom_attribute)] to the crate attributes to enable
-
error[E0659]: `my_attr` is ambiguous (derive helper attribute vs any other name)
--> $DIR/derive-helper-shadowing.rs:6:3
|
@@ -24,7 +16,6 @@
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use `crate::my_attr` to refer to this attribute macro unambiguously
-error: aborting due to 2 previous errors
+error: aborting due to previous error
-Some errors occurred: E0658, E0659.
-For more information about an error, try `rustc --explain E0658`.
+For more information about this error, try `rustc --explain E0659`.
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 3bea781..e70a359 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:6:5
+ --> $DIR/not-whitelisted.rs:16:5
|
LL | use test; //~ ERROR cannot import a built-in macro
| ^^^^
error[E0432]: unresolved import `alloc`
- --> $DIR/not-whitelisted.rs:5:5
+ --> $DIR/not-whitelisted.rs:15:5
|
LL | use alloc; //~ ERROR unresolved import `alloc`
| ^^^^^ no `alloc` external crate
diff --git a/src/test/ui/rust-2018/future-proofing-locals.stderr b/src/test/ui/rust-2018/future-proofing-locals.stderr
index 413e199..6b4baab 100644
--- a/src/test/ui/rust-2018/future-proofing-locals.stderr
+++ b/src/test/ui/rust-2018/future-proofing-locals.stderr
@@ -1,53 +1,53 @@
error: imports cannot refer to type parameters
- --> $DIR/future-proofing-locals.rs:13:9
+ --> $DIR/future-proofing-locals.rs:14:9
|
LL | use T as _; //~ ERROR imports cannot refer to type parameters
| ^
error: imports cannot refer to type parameters
- --> $DIR/future-proofing-locals.rs:14:9
+ --> $DIR/future-proofing-locals.rs:15:9
|
LL | use T::U; //~ ERROR imports cannot refer to type parameters
| ^
error: imports cannot refer to type parameters
- --> $DIR/future-proofing-locals.rs:15:9
+ --> $DIR/future-proofing-locals.rs:16:9
|
LL | use T::*; //~ ERROR imports cannot refer to type parameters
| ^
error: imports cannot refer to type parameters
- --> $DIR/future-proofing-locals.rs:19:9
+ --> $DIR/future-proofing-locals.rs:20:9
|
LL | use T; //~ ERROR imports cannot refer to type parameters
| ^
error: imports cannot refer to local variables
- --> $DIR/future-proofing-locals.rs:25:9
+ --> $DIR/future-proofing-locals.rs:26:9
|
LL | use x as _; //~ ERROR imports cannot refer to local variables
| ^
error: imports cannot refer to local variables
- --> $DIR/future-proofing-locals.rs:31:9
+ --> $DIR/future-proofing-locals.rs:32:9
|
LL | use x; //~ ERROR imports cannot refer to local variables
| ^
error: imports cannot refer to local variables
- --> $DIR/future-proofing-locals.rs:37:17
+ --> $DIR/future-proofing-locals.rs:38:17
|
LL | use x; //~ ERROR imports cannot refer to local variables
| ^
error: imports cannot refer to type parameters
- --> $DIR/future-proofing-locals.rs:45:10
+ --> $DIR/future-proofing-locals.rs:46:10
|
LL | use {T as _, x}; //~ ERROR imports cannot refer to type parameters
| ^
error: imports cannot refer to local variables
- --> $DIR/future-proofing-locals.rs:45:18
+ --> $DIR/future-proofing-locals.rs:46:18
|
LL | use {T as _, x}; //~ ERROR imports cannot refer to type parameters
| ^
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 71c8289..4fb1a05 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:10:9
+ --> $DIR/local-path-suggestions-2018.rs:20:9
|
LL | use foo::Bar; //~ ERROR unresolved import `foo`
| ^^^ did you mean `crate::foo`?
@@ -7,7 +7,7 @@
= 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:19:5
+ --> $DIR/local-path-suggestions-2018.rs:29:5
|
LL | use foobar::Baz; //~ ERROR unresolved import `foobar`
| ^^^^^^ did you mean `baz::foobar`?
diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.rs b/src/test/ui/rust-2018/uniform-paths/issue-56596.rs
index 5c40d78..ec5bb65 100644
--- a/src/test/ui/rust-2018/uniform-paths/issue-56596.rs
+++ b/src/test/ui/rust-2018/uniform-paths/issue-56596.rs
@@ -2,8 +2,6 @@
// compile-flags: --extern issue_56596
// aux-build:issue-56596.rs
-#![feature(uniform_paths)]
-
mod m {
pub mod issue_56596 {}
}
diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr
index 293d0ec..01bbe13 100644
--- a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr
@@ -1,5 +1,5 @@
error[E0659]: `issue_56596` is ambiguous (name vs any other name during import resolution)
- --> $DIR/issue-56596.rs:12:5
+ --> $DIR/issue-56596.rs:10:5
|
LL | use issue_56596; //~ ERROR `issue_56596` is ambiguous
| ^^^^^^^^^^^ ambiguous name
@@ -7,7 +7,7 @@
= note: `issue_56596` could refer to an extern crate passed with `--extern`
= help: use `::issue_56596` to refer to this extern crate unambiguously
note: `issue_56596` could also refer to the module imported here
- --> $DIR/issue-56596.rs:11:5
+ --> $DIR/issue-56596.rs:9:5
|
LL | use m::*;
| ^^^^
diff --git a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr
index 004bcc4..684f5fc 100644
--- a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr
@@ -11,18 +11,18 @@
| ^^^^^^^^^^^^^^^^^
error[E0659]: `legacy_macro` is ambiguous (name vs any other name during import resolution)
- --> $DIR/macro-rules.rs:30:13
+ --> $DIR/macro-rules.rs:31:13
|
LL | use legacy_macro as _; //~ ERROR `legacy_macro` is ambiguous
| ^^^^^^^^^^^^ ambiguous name
|
note: `legacy_macro` could refer to the macro defined here
- --> $DIR/macro-rules.rs:27:9
+ --> $DIR/macro-rules.rs:28:9
|
LL | macro_rules! legacy_macro { () => () }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `legacy_macro` could also refer to the macro defined here
- --> $DIR/macro-rules.rs:24:5
+ --> $DIR/macro-rules.rs:25:5
|
LL | macro legacy_macro() {}
| ^^^^^^^^^^^^^^^^^^^^^^^