Skip to content

Commit aa2fb6e

Browse files
committed
report everything as an error for crater
1 parent 0a6d58a commit aa2fb6e

File tree

5 files changed

+7
-56
lines changed

5 files changed

+7
-56
lines changed

compiler/rustc_resolve/src/build_reduced_graph.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
8383
span: Span,
8484
expansion: LocalExpnId,
8585
ambiguity: Option<(NameBinding<'ra>, AmbiguityKind)>,
86-
warn_ambiguity: bool,
86+
_warn_ambiguity: bool,
8787
) {
8888
let binding = self.arenas.alloc_name_binding(NameBindingData {
8989
kind: NameBindingKind::Res(res),
9090
ambiguity,
91-
warn_ambiguity,
91+
// FIXME: report everything as an error for crater
92+
warn_ambiguity: false,
9293
vis,
9394
span,
9495
expansion,

tests/ui/imports/ambiguous-2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ extern crate ambiguous_1;
55

66
fn main() {
77
ambiguous_1::id(); //~ ERROR `id` is ambiguous
8-
//~| WARN this was previously accepted
98
}
Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
error: `id` is ambiguous
1+
error[E0659]: `id` is ambiguous
22
--> $DIR/ambiguous-2.rs:7:18
33
|
44
LL | ambiguous_1::id();
55
| ^^ ambiguous name
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
97
= note: ambiguous because of multiple glob imports of a name in the same module
108
note: `id` could refer to the function defined here
119
--> $DIR/auxiliary/../ambiguous-1.rs:13:13
@@ -17,29 +15,7 @@ note: `id` could also refer to the function defined here
1715
|
1816
LL | pub use self::handwritten::*;
1917
| ^^^^^^^^^^^^^^^^^
20-
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
2118

2219
error: aborting due to 1 previous error
2320

24-
Future incompatibility report: Future breakage diagnostic:
25-
error: `id` is ambiguous
26-
--> $DIR/ambiguous-2.rs:7:18
27-
|
28-
LL | ambiguous_1::id();
29-
| ^^ ambiguous name
30-
|
31-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32-
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
33-
= note: ambiguous because of multiple glob imports of a name in the same module
34-
note: `id` could refer to the function defined here
35-
--> $DIR/auxiliary/../ambiguous-1.rs:13:13
36-
|
37-
LL | pub use self::evp::*;
38-
| ^^^^^^^^^
39-
note: `id` could also refer to the function defined here
40-
--> $DIR/auxiliary/../ambiguous-1.rs:15:13
41-
|
42-
LL | pub use self::handwritten::*;
43-
| ^^^^^^^^^^^^^^^^^
44-
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
45-
21+
For more information about this error, try `rustc --explain E0659`.

tests/ui/imports/ambiguous-4.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ extern crate ambiguous_4_extern;
44

55
fn main() {
66
ambiguous_4_extern::id(); //~ ERROR `id` is ambiguous
7-
//~| WARN this was previously accepted
87
}
Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
error: `id` is ambiguous
1+
error[E0659]: `id` is ambiguous
22
--> $DIR/ambiguous-4.rs:6:25
33
|
44
LL | ambiguous_4_extern::id();
55
| ^^ ambiguous name
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
97
= note: ambiguous because of multiple glob imports of a name in the same module
108
note: `id` could refer to the function defined here
119
--> $DIR/auxiliary/../ambiguous-4-extern.rs:12:9
@@ -17,29 +15,7 @@ note: `id` could also refer to the function defined here
1715
|
1816
LL | pub use handwritten::*;
1917
| ^^^^^^^^^^^
20-
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
2118

2219
error: aborting due to 1 previous error
2320

24-
Future incompatibility report: Future breakage diagnostic:
25-
error: `id` is ambiguous
26-
--> $DIR/ambiguous-4.rs:6:25
27-
|
28-
LL | ambiguous_4_extern::id();
29-
| ^^ ambiguous name
30-
|
31-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32-
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
33-
= note: ambiguous because of multiple glob imports of a name in the same module
34-
note: `id` could refer to the function defined here
35-
--> $DIR/auxiliary/../ambiguous-4-extern.rs:12:9
36-
|
37-
LL | pub use evp::*;
38-
| ^^^
39-
note: `id` could also refer to the function defined here
40-
--> $DIR/auxiliary/../ambiguous-4-extern.rs:13:9
41-
|
42-
LL | pub use handwritten::*;
43-
| ^^^^^^^^^^^
44-
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
45-
21+
For more information about this error, try `rustc --explain E0659`.

0 commit comments

Comments
 (0)