fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.7 KiB57 linesraw
1error[E0659]: `Foo` is ambiguous (name vs any other name during import resolution)
2  --> $DIR/block-scoped-shadow.rs:11:9
3   |
4LL |     use Foo::*;
5   |         ^^^ ambiguous name
6   |
7note: `Foo` could refer to the enum defined here
8  --> $DIR/block-scoped-shadow.rs:10:5
9   |
10LL |     enum Foo { A, B }
11   |     ^^^^^^^^^^^^^^^^^
12note: `Foo` could also refer to the enum defined here
13  --> $DIR/block-scoped-shadow.rs:5:1
14   |
15LL | enum Foo {}
16   | ^^^^^^^^^^^
17   = help: use `crate::Foo` to refer to this enum unambiguously
18
19error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
20  --> $DIR/block-scoped-shadow.rs:18:9
21   |
22LL |     use std as foo;
23   |         ^^^ ambiguous name
24   |
25note: `std` could refer to the enum defined here
26  --> $DIR/block-scoped-shadow.rs:17:5
27   |
28LL |     enum std {}
29   |     ^^^^^^^^^^^
30note: `std` could also refer to the struct defined here
31  --> $DIR/block-scoped-shadow.rs:7:1
32   |
33LL | struct std;
34   | ^^^^^^^^^^^
35   = help: use `crate::std` to refer to this struct unambiguously
36
37error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
38  --> $DIR/block-scoped-shadow.rs:18:9
39   |
40LL |     use std as foo;
41   |         ^^^ ambiguous name
42   |
43note: `std` could refer to the function defined here
44  --> $DIR/block-scoped-shadow.rs:16:5
45   |
46LL |     fn std() {}
47   |     ^^^^^^^^^^^
48note: `std` could also refer to the unit struct defined here
49  --> $DIR/block-scoped-shadow.rs:7:1
50   |
51LL | struct std;
52   | ^^^^^^^^^^^
53   = help: use `crate::std` to refer to this unit struct unambiguously
54
55error: aborting due to 3 previous errors
56
57For more information about this error, try `rustc --explain E0659`.