Skip to content

Commit bc232d3

Browse files
committed
Fix rebase
1 parent 079f44f commit bc232d3

File tree

10 files changed

+28
-44
lines changed

10 files changed

+28
-44
lines changed

src/librustc_resolve/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
962962
if ns == TypeNS && use_prelude && self.extern_prelude_get(ident, true).is_some() {
963963
break 'ok;
964964
}
965-
let root_ident = Ident::new(keywords::PathRoot.name(), orig_ident.span);
965+
let root_ident = Ident::new(keywords::CrateRoot.name(), orig_ident.span);
966966
let root_module = self.resolve_crate_root(root_ident);
967967
if self.resolve_ident_in_module_ext(ModuleOrUniformRoot::Module(root_module),
968968
orig_ident, ns, None, false, path_span)

src/test/ui/imports/issue-56125.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error[E0433]: failed to resolve: could not find `non_last_segment` in `issue_56125`
2-
--> $DIR/issue-56125.rs:14:22
2+
--> $DIR/issue-56125.rs:12:22
33
|
44
LL | use issue_56125::non_last_segment::non_last_segment::*;
55
| ^^^^^^^^^^^^^^^^ could not find `non_last_segment` in `issue_56125`
66

77
error[E0432]: unresolved import `issue_56125::last_segment`
8-
--> $DIR/issue-56125.rs:8:22
8+
--> $DIR/issue-56125.rs:6:22
99
|
1010
LL | use issue_56125::last_segment::*;
1111
| ^^^^^^^^^^^^ could not find `last_segment` in `issue_56125`
1212

1313
error[E0432]: unresolved import `empty::issue_56125`
14-
--> $DIR/issue-56125.rs:17:9
14+
--> $DIR/issue-56125.rs:19:9
1515
|
1616
LL | use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
1717
| ^^^^^^^^^^^^^^^^^^ no `issue_56125` in `m3::empty`
@@ -32,30 +32,30 @@ LL | use issue_56125::last_segment::*;
3232
= help: use `self::issue_56125` to refer to this module unambiguously
3333

3434
error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
35-
--> $DIR/issue-56125.rs:11:9
35+
--> $DIR/issue-56125.rs:12:9
3636
|
3737
LL | use issue_56125::non_last_segment::non_last_segment::*;
3838
| ^^^^^^^^^^^ ambiguous name
3939
|
4040
= note: `issue_56125` could refer to an extern crate passed with `--extern`
4141
= help: use `::issue_56125` to refer to this extern crate unambiguously
4242
note: `issue_56125` could also refer to the module imported here
43-
--> $DIR/issue-56125.rs:11:9
43+
--> $DIR/issue-56125.rs:12:9
4444
|
4545
LL | use issue_56125::non_last_segment::non_last_segment::*;
4646
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4747
= help: use `self::issue_56125` to refer to this module unambiguously
4848

4949
error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
50-
--> $DIR/issue-56125.rs:18:9
50+
--> $DIR/issue-56125.rs:20:9
5151
|
5252
LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
5353
| ^^^^^^^^^^^ ambiguous name
5454
|
5555
= note: `issue_56125` could refer to an extern crate passed with `--extern`
5656
= help: use `::issue_56125` to refer to this extern crate unambiguously
5757
note: `issue_56125` could also refer to the module imported here
58-
--> $DIR/issue-56125.rs:18:9
58+
--> $DIR/issue-56125.rs:20:9
5959
|
6060
LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
6161
| ^^^^^^^^^^^^^^

src/test/ui/proc-macro/derive-helper-shadowing.rs

-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ struct S {
1616
#[my_attr]
1717
struct U;
1818

19-
mod inner {
20-
#[my_attr] //~ ERROR attribute `my_attr` is currently unknown
21-
struct V;
22-
}
23-
2419
0
2520
}]
2621
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
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)
2-
--> $DIR/derive-helper-shadowing.rs:20:15
3-
|
4-
LL | #[my_attr] //~ ERROR attribute `my_attr` is currently unknown
5-
| ^^^^^^^
6-
|
7-
= help: add #![feature(custom_attribute)] to the crate attributes to enable
8-
91
error[E0659]: `my_attr` is ambiguous (derive helper attribute vs any other name)
102
--> $DIR/derive-helper-shadowing.rs:6:3
113
|
@@ -24,7 +16,6 @@ LL | use derive_helper_shadowing::*;
2416
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2517
= help: use `crate::my_attr` to refer to this attribute macro unambiguously
2618

27-
error: aborting due to 2 previous errors
19+
error: aborting due to previous error
2820

29-
Some errors occurred: E0658, E0659.
30-
For more information about an error, try `rustc --explain E0658`.
21+
For more information about this error, try `rustc --explain E0659`.

src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: cannot import a built-in macro
2-
--> $DIR/not-whitelisted.rs:6:5
2+
--> $DIR/not-whitelisted.rs:16:5
33
|
44
LL | use test; //~ ERROR cannot import a built-in macro
55
| ^^^^
66

77
error[E0432]: unresolved import `alloc`
8-
--> $DIR/not-whitelisted.rs:5:5
8+
--> $DIR/not-whitelisted.rs:15:5
99
|
1010
LL | use alloc; //~ ERROR unresolved import `alloc`
1111
| ^^^^^ no `alloc` external crate

src/test/ui/rust-2018/future-proofing-locals.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
error: imports cannot refer to type parameters
2-
--> $DIR/future-proofing-locals.rs:13:9
2+
--> $DIR/future-proofing-locals.rs:14:9
33
|
44
LL | use T as _; //~ ERROR imports cannot refer to type parameters
55
| ^
66

77
error: imports cannot refer to type parameters
8-
--> $DIR/future-proofing-locals.rs:14:9
8+
--> $DIR/future-proofing-locals.rs:15:9
99
|
1010
LL | use T::U; //~ ERROR imports cannot refer to type parameters
1111
| ^
1212

1313
error: imports cannot refer to type parameters
14-
--> $DIR/future-proofing-locals.rs:15:9
14+
--> $DIR/future-proofing-locals.rs:16:9
1515
|
1616
LL | use T::*; //~ ERROR imports cannot refer to type parameters
1717
| ^
1818

1919
error: imports cannot refer to type parameters
20-
--> $DIR/future-proofing-locals.rs:19:9
20+
--> $DIR/future-proofing-locals.rs:20:9
2121
|
2222
LL | use T; //~ ERROR imports cannot refer to type parameters
2323
| ^
2424

2525
error: imports cannot refer to local variables
26-
--> $DIR/future-proofing-locals.rs:25:9
26+
--> $DIR/future-proofing-locals.rs:26:9
2727
|
2828
LL | use x as _; //~ ERROR imports cannot refer to local variables
2929
| ^
3030

3131
error: imports cannot refer to local variables
32-
--> $DIR/future-proofing-locals.rs:31:9
32+
--> $DIR/future-proofing-locals.rs:32:9
3333
|
3434
LL | use x; //~ ERROR imports cannot refer to local variables
3535
| ^
3636

3737
error: imports cannot refer to local variables
38-
--> $DIR/future-proofing-locals.rs:37:17
38+
--> $DIR/future-proofing-locals.rs:38:17
3939
|
4040
LL | use x; //~ ERROR imports cannot refer to local variables
4141
| ^
4242

4343
error: imports cannot refer to type parameters
44-
--> $DIR/future-proofing-locals.rs:45:10
44+
--> $DIR/future-proofing-locals.rs:46:10
4545
|
4646
LL | use {T as _, x}; //~ ERROR imports cannot refer to type parameters
4747
| ^
4848

4949
error: imports cannot refer to local variables
50-
--> $DIR/future-proofing-locals.rs:45:18
50+
--> $DIR/future-proofing-locals.rs:46:18
5151
|
5252
LL | use {T as _, x}; //~ ERROR imports cannot refer to type parameters
5353
| ^

src/test/ui/rust-2018/local-path-suggestions-2018.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0432]: unresolved import `foo`
2-
--> $DIR/local-path-suggestions-2018.rs:10:9
2+
--> $DIR/local-path-suggestions-2018.rs:20:9
33
|
44
LL | use foo::Bar; //~ ERROR unresolved import `foo`
55
| ^^^ did you mean `crate::foo`?
66
|
77
= note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>
88

99
error[E0432]: unresolved import `foobar`
10-
--> $DIR/local-path-suggestions-2018.rs:19:5
10+
--> $DIR/local-path-suggestions-2018.rs:29:5
1111
|
1212
LL | use foobar::Baz; //~ ERROR unresolved import `foobar`
1313
| ^^^^^^ did you mean `baz::foobar`?

src/test/ui/rust-2018/uniform-paths/issue-56596.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// compile-flags: --extern issue_56596
33
// aux-build:issue-56596.rs
44

5-
#![feature(uniform_paths)]
6-
75
mod m {
86
pub mod issue_56596 {}
97
}

src/test/ui/rust-2018/uniform-paths/issue-56596.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0659]: `issue_56596` is ambiguous (name vs any other name during import resolution)
2-
--> $DIR/issue-56596.rs:12:5
2+
--> $DIR/issue-56596.rs:10:5
33
|
44
LL | use issue_56596; //~ ERROR `issue_56596` is ambiguous
55
| ^^^^^^^^^^^ ambiguous name
66
|
77
= note: `issue_56596` could refer to an extern crate passed with `--extern`
88
= help: use `::issue_56596` to refer to this extern crate unambiguously
99
note: `issue_56596` could also refer to the module imported here
10-
--> $DIR/issue-56596.rs:11:5
10+
--> $DIR/issue-56596.rs:9:5
1111
|
1212
LL | use m::*;
1313
| ^^^^

src/test/ui/rust-2018/uniform-paths/macro-rules.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ LL | pub use legacy_macro as _; //~ ERROR `legacy_macro` is private, and can
1111
| ^^^^^^^^^^^^^^^^^
1212

1313
error[E0659]: `legacy_macro` is ambiguous (name vs any other name during import resolution)
14-
--> $DIR/macro-rules.rs:30:13
14+
--> $DIR/macro-rules.rs:31:13
1515
|
1616
LL | use legacy_macro as _; //~ ERROR `legacy_macro` is ambiguous
1717
| ^^^^^^^^^^^^ ambiguous name
1818
|
1919
note: `legacy_macro` could refer to the macro defined here
20-
--> $DIR/macro-rules.rs:27:9
20+
--> $DIR/macro-rules.rs:28:9
2121
|
2222
LL | macro_rules! legacy_macro { () => () }
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424
note: `legacy_macro` could also refer to the macro defined here
25-
--> $DIR/macro-rules.rs:24:5
25+
--> $DIR/macro-rules.rs:25:5
2626
|
2727
LL | macro legacy_macro() {}
2828
| ^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)