Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Jan 9, 2019
1 parent 079f44f commit bc232d3
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/librustc_resolve/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
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)
Expand Down
14 changes: 7 additions & 7 deletions src/test/ui/imports/issue-56125.stderr
Original file line number Diff line number Diff line change
@@ -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`
Expand All @@ -32,30 +32,30 @@ 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:11:9
--> $DIR/issue-56125.rs:12:9
|
LL | use issue_56125::non_last_segment::non_last_segment::*;
| ^^^^^^^^^^^ ambiguous name
|
= 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
|
= 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
| ^^^^^^^^^^^^^^
Expand Down
5 changes: 0 additions & 5 deletions src/test/ui/proc-macro/derive-helper-shadowing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ struct S {
#[my_attr]
struct U;

mod inner {
#[my_attr] //~ ERROR attribute `my_attr` is currently unknown
struct V;
}

0
}]
}
Expand Down
13 changes: 2 additions & 11 deletions src/test/ui/proc-macro/derive-helper-shadowing.stderr
Original file line number Diff line number Diff line change
@@ -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
|
Expand All @@ -24,7 +16,6 @@ LL | use derive_helper_shadowing::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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`.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 9 additions & 9 deletions src/test/ui/rust-2018/future-proofing-locals.stderr
Original file line number Diff line number Diff line change
@@ -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
| ^
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/rust-2018/local-path-suggestions-2018.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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`?
|
= 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`?
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/rust-2018/uniform-paths/issue-56596.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// compile-flags: --extern issue_56596
// aux-build:issue-56596.rs

#![feature(uniform_paths)]

mod m {
pub mod issue_56596 {}
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/rust-2018/uniform-paths/issue-56596.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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
|
= 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::*;
| ^^^^
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/rust-2018/uniform-paths/macro-rules.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ LL | pub use legacy_macro as _; //~ ERROR `legacy_macro` is private, and can
| ^^^^^^^^^^^^^^^^^

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() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit bc232d3

Please sign in to comment.