]> git.lizzy.rs Git - rust.git/commitdiff
Make deprecation lint `ambiguous_associated_items` deny-by-default
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Fri, 12 Apr 2019 19:03:41 +0000 (22:03 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Fri, 12 Apr 2019 19:32:01 +0000 (22:32 +0300)
src/librustc/lint/builtin.rs
src/test/ui/type-alias-enum-variants-priority.rs
src/test/ui/type-alias-enum-variants-priority.stderr

index cbdeda7b902066da87fbab65b8ad9204fb7028f7..79c11c444da5729cc84f58178ebc5e28355d3abd 100644 (file)
@@ -382,7 +382,7 @@ pub mod parser {
 
 declare_lint! {
     pub AMBIGUOUS_ASSOCIATED_ITEMS,
-    Warn,
+    Deny,
     "ambiguous associated items"
 }
 
index db1da2b12e256645b03babf708c1905f22943d8b..82cd21b09d3e7de0717d80df8876d3d58a128f17 100644 (file)
@@ -1,5 +1,4 @@
 #![feature(type_alias_enum_variants)]
-#![deny(ambiguous_associated_items)]
 
 enum E {
     V
index dcf7dc77ed5eab21fa4ab01eb343aaf198cb2129..b8271807b835da963da7fb501089929a4b3a9717 100644 (file)
@@ -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;
    |     ^^^^^^^