about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/unused_trait_names.fixed23
-rw-r--r--tests/ui/unused_trait_names.rs21
-rw-r--r--tests/ui/unused_trait_names.stderr13
3 files changed, 4 insertions, 53 deletions
diff --git a/tests/ui/unused_trait_names.fixed b/tests/ui/unused_trait_names.fixed
index 60e69b470c1..6abbed01bb0 100644
--- a/tests/ui/unused_trait_names.fixed
+++ b/tests/ui/unused_trait_names.fixed
@@ -200,11 +200,11 @@ fn msrv_1_33() {
     MyStruct.do_things();
 }
 
+// Linting inside macro expansion is no longer supported
 mod lint_inside_macro_expansion_bad {
     macro_rules! foo {
         () => {
-            use std::any::Any as _;
-            //~^ unused_trait_names
+            use std::any::Any;
             fn bar() {
                 "bar".type_id();
             }
@@ -294,22 +294,3 @@ mod allow_lint_import {
 //         "foo".type_id();
 //     }
 // }
-
-mod issue14924 {
-    mod m {
-        pub trait Tr {
-            fn method(&self) {}
-        }
-
-        impl Tr for u8 {}
-    }
-
-    macro gen_import($Br: ident) {
-        use m::Tr as $Br;
-    }
-    gen_import!(Br);
-
-    fn do_something() {
-        0u8.method();
-    }
-}
diff --git a/tests/ui/unused_trait_names.rs b/tests/ui/unused_trait_names.rs
index 6bef8f9070e..4a06f062dc3 100644
--- a/tests/ui/unused_trait_names.rs
+++ b/tests/ui/unused_trait_names.rs
@@ -200,11 +200,11 @@ fn msrv_1_33() {
     MyStruct.do_things();
 }
 
+// Linting inside macro expansion is no longer supported
 mod lint_inside_macro_expansion_bad {
     macro_rules! foo {
         () => {
             use std::any::Any;
-            //~^ unused_trait_names
             fn bar() {
                 "bar".type_id();
             }
@@ -294,22 +294,3 @@ mod allow_lint_import {
 //         "foo".type_id();
 //     }
 // }
-
-mod issue14924 {
-    mod m {
-        pub trait Tr {
-            fn method(&self) {}
-        }
-
-        impl Tr for u8 {}
-    }
-
-    macro gen_import($Br: ident) {
-        use m::Tr as $Br;
-    }
-    gen_import!(Br);
-
-    fn do_something() {
-        0u8.method();
-    }
-}
diff --git a/tests/ui/unused_trait_names.stderr b/tests/ui/unused_trait_names.stderr
index 3183289d853..28067e17414 100644
--- a/tests/ui/unused_trait_names.stderr
+++ b/tests/ui/unused_trait_names.stderr
@@ -58,16 +58,5 @@ error: importing trait that is only used anonymously
 LL |     use simple_trait::{MyStruct, MyTrait};
    |                                  ^^^^^^^ help: use: `MyTrait as _`
 
-error: importing trait that is only used anonymously
-  --> tests/ui/unused_trait_names.rs:206:27
-   |
-LL |             use std::any::Any;
-   |                           ^^^ help: use: `Any as _`
-...
-LL |     foo!();
-   |     ------ in this macro invocation
-   |
-   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 10 previous errors
+error: aborting due to 9 previous errors