Skip to content

Commit bee92b5

Browse files
committed
Make deprecation lint ambiguous_associated_items deny-by-default
1 parent 9a612b2 commit bee92b5

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/librustc/lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ declare_lint! {
382382

383383
declare_lint! {
384384
pub AMBIGUOUS_ASSOCIATED_ITEMS,
385-
Warn,
385+
Deny,
386386
"ambiguous associated items"
387387
}
388388

src/test/ui/type-alias-enum-variants-priority.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(type_alias_enum_variants)]
2-
#![deny(ambiguous_associated_items)]
32

43
enum E {
54
V

src/test/ui/type-alias-enum-variants-priority.stderr

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
error: ambiguous associated item
2-
--> $DIR/type-alias-enum-variants-priority.rs:15:15
2+
--> $DIR/type-alias-enum-variants-priority.rs:14:15
33
|
44
LL | fn f() -> Self::V { 0 }
55
| ^^^^^^^ help: use fully-qualified syntax: `<E as Trait>::V`
66
|
7-
note: lint level defined here
8-
--> $DIR/type-alias-enum-variants-priority.rs:2:9
9-
|
10-
LL | #![deny(ambiguous_associated_items)]
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
7+
= note: #[deny(ambiguous_associated_items)] on by default
128
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
139
= note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
1410
note: `V` could refer to variant defined here
15-
--> $DIR/type-alias-enum-variants-priority.rs:5:5
11+
--> $DIR/type-alias-enum-variants-priority.rs:4:5
1612
|
1713
LL | V
1814
| ^
1915
note: `V` could also refer to associated type defined here
20-
--> $DIR/type-alias-enum-variants-priority.rs:9:5
16+
--> $DIR/type-alias-enum-variants-priority.rs:8:5
2117
|
2218
LL | type V;
2319
| ^^^^^^^

0 commit comments

Comments
 (0)