Skip to content

Commit 7d7787d

Browse files
authored
Rollup merge of rust-lang#59928 - petrochenkov:denyambass, r=varkor
Make deprecation lint `ambiguous_associated_items` deny-by-default As requested by r? @Centril cc rust-lang#57644
2 parents 08bfe16 + bee92b5 commit 7d7787d

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
@@ -376,7 +376,7 @@ declare_lint! {
376376

377377
declare_lint! {
378378
pub AMBIGUOUS_ASSOCIATED_ITEMS,
379-
Warn,
379+
Deny,
380380
"ambiguous associated items"
381381
}
382382

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)