Skip to content

Commit

Permalink
Rollup merge of rust-lang#59928 - petrochenkov:denyambass, r=varkor
Browse files Browse the repository at this point in the history
Make deprecation lint `ambiguous_associated_items` deny-by-default

As requested by r? @Centril

cc rust-lang#57644
  • Loading branch information
Centril committed May 3, 2019
2 parents ef9a876 + bee92b5 commit e9509f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ declare_lint! {

declare_lint! {
pub AMBIGUOUS_ASSOCIATED_ITEMS,
Warn,
Deny,
"ambiguous associated items"
}

Expand Down
1 change: 0 additions & 1 deletion src/test/ui/type-alias-enum-variants-priority.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(type_alias_enum_variants)]
#![deny(ambiguous_associated_items)]

enum E {
V
Expand Down
12 changes: 4 additions & 8 deletions src/test/ui/type-alias-enum-variants-priority.stderr
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
error: ambiguous associated item
--> $DIR/type-alias-enum-variants-priority.rs:15:15
--> $DIR/type-alias-enum-variants-priority.rs:14:15
|
LL | fn f() -> Self::V { 0 }
| ^^^^^^^ help: use fully-qualified syntax: `<E as Trait>::V`
|
note: lint level defined here
--> $DIR/type-alias-enum-variants-priority.rs:2:9
|
LL | #![deny(ambiguous_associated_items)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: #[deny(ambiguous_associated_items)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
note: `V` could refer to variant defined here
--> $DIR/type-alias-enum-variants-priority.rs:5:5
--> $DIR/type-alias-enum-variants-priority.rs:4:5
|
LL | V
| ^
note: `V` could also refer to associated type defined here
--> $DIR/type-alias-enum-variants-priority.rs:9:5
--> $DIR/type-alias-enum-variants-priority.rs:8:5
|
LL | type V;
| ^^^^^^^
Expand Down

0 comments on commit e9509f8

Please sign in to comment.