about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-11-06 10:36:04 -0800
committerManish Goregaokar <manishsmail@gmail.com>2019-11-07 12:53:36 -0800
commitfe90b82951f4a240ffd064c4a4b8ecfe2177f454 (patch)
tree24a8c3b9ad5fd0caa9c7bc221d6f08c096813cf2
parent7531a08eed84a86e96d1cffdd002654507819873 (diff)
downloadrust-fe90b82951f4a240ffd064c4a4b8ecfe2177f454.tar.gz
rust-fe90b82951f4a240ffd064c4a4b8ecfe2177f454.zip
Remove clippy_lints from useless attribute test
-rw-r--r--tests/ui/auxiliary/proc_macro_derive.rs2
-rw-r--r--tests/ui/used_underscore_binding.rs1
-rw-r--r--tests/ui/used_underscore_binding.stderr10
-rw-r--r--tests/ui/useless_attribute.rs5
-rw-r--r--tests/ui/useless_attribute.stderr4
5 files changed, 11 insertions, 11 deletions
diff --git a/tests/ui/auxiliary/proc_macro_derive.rs b/tests/ui/auxiliary/proc_macro_derive.rs
index 08b99317302..f6d101a0911 100644
--- a/tests/ui/auxiliary/proc_macro_derive.rs
+++ b/tests/ui/auxiliary/proc_macro_derive.rs
@@ -16,7 +16,7 @@ pub fn derive(_: TokenStream) -> TokenStream {
     let output = quote! {
         // Should not trigger `useless_attribute`
         #[allow(dead_code)]
-        extern crate clippy_lints;
+        extern crate rustc;
     };
     output
 }
diff --git a/tests/ui/used_underscore_binding.rs b/tests/ui/used_underscore_binding.rs
index 5a02ff5d193..9c06e047c4a 100644
--- a/tests/ui/used_underscore_binding.rs
+++ b/tests/ui/used_underscore_binding.rs
@@ -1,5 +1,6 @@
 // aux-build:proc_macro_derive.rs
 
+#![feature(rustc_private)]
 #![warn(clippy::all)]
 #![allow(clippy::blacklisted_name)]
 #![warn(clippy::used_underscore_binding)]
diff --git a/tests/ui/used_underscore_binding.stderr b/tests/ui/used_underscore_binding.stderr
index 8216a3c66e5..47693518f86 100644
--- a/tests/ui/used_underscore_binding.stderr
+++ b/tests/ui/used_underscore_binding.stderr
@@ -1,5 +1,5 @@
 error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
-  --> $DIR/used_underscore_binding.rs:24:5
+  --> $DIR/used_underscore_binding.rs:25:5
    |
 LL |     _foo + 1
    |     ^^^^
@@ -7,25 +7,25 @@ LL |     _foo + 1
    = note: `-D clippy::used-underscore-binding` implied by `-D warnings`
 
 error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
-  --> $DIR/used_underscore_binding.rs:29:20
+  --> $DIR/used_underscore_binding.rs:30:20
    |
 LL |     println!("{}", _foo);
    |                    ^^^^
 
 error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
-  --> $DIR/used_underscore_binding.rs:30:16
+  --> $DIR/used_underscore_binding.rs:31:16
    |
 LL |     assert_eq!(_foo, _foo);
    |                ^^^^
 
 error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
-  --> $DIR/used_underscore_binding.rs:30:22
+  --> $DIR/used_underscore_binding.rs:31:22
    |
 LL |     assert_eq!(_foo, _foo);
    |                      ^^^^
 
 error: used binding `_underscore_field` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
-  --> $DIR/used_underscore_binding.rs:43:5
+  --> $DIR/used_underscore_binding.rs:44:5
    |
 LL |     s._underscore_field += 1;
    |     ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/useless_attribute.rs b/tests/ui/useless_attribute.rs
index dd84b1b2c1c..529680a7588 100644
--- a/tests/ui/useless_attribute.rs
+++ b/tests/ui/useless_attribute.rs
@@ -2,16 +2,15 @@
 
 #![warn(clippy::useless_attribute)]
 #![warn(unreachable_pub)]
+#![feature(rustc_private)]
 
 #[allow(dead_code)]
 #[cfg_attr(feature = "cargo-clippy", allow(dead_code))]
 #[rustfmt::skip]
-#[cfg_attr(feature = "cargo-clippy",
-           allow(dead_code))]
 #[allow(unused_imports)]
 #[allow(unused_extern_crates)]
 #[macro_use]
-extern crate clippy_lints;
+extern crate rustc;
 
 #[macro_use]
 extern crate proc_macro_derive;
diff --git a/tests/ui/useless_attribute.stderr b/tests/ui/useless_attribute.stderr
index bf7ea1698d3..87a1291543e 100644
--- a/tests/ui/useless_attribute.stderr
+++ b/tests/ui/useless_attribute.stderr
@@ -1,5 +1,5 @@
 error: useless lint attribute
-  --> $DIR/useless_attribute.rs:6:1
+  --> $DIR/useless_attribute.rs:7:1
    |
 LL | #[allow(dead_code)]
    | ^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(dead_code)]`
@@ -7,7 +7,7 @@ LL | #[allow(dead_code)]
    = note: `-D clippy::useless-attribute` implied by `-D warnings`
 
 error: useless lint attribute
-  --> $DIR/useless_attribute.rs:7:1
+  --> $DIR/useless_attribute.rs:8:1
    |
 LL | #[cfg_attr(feature = "cargo-clippy", allow(dead_code))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code)`