about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-02-28 16:47:00 +0100
committerflip1995 <hello@philkrones.com>2019-02-28 20:18:42 +0100
commitc4eb7801565fe0c69f3f199f64db40dfdd084590 (patch)
tree856b58bef85d2291c0eee28c899c45362935be8d
parent1463d6f69f4d20b94681b1a44db96fe3aa611b4c (diff)
downloadrust-c4eb7801565fe0c69f3f199f64db40dfdd084590.tar.gz
rust-c4eb7801565fe0c69f3f199f64db40dfdd084590.zip
Add test for unknown Clippy attributes
-rw-r--r--tests/ui/unknown_attribute.rs3
-rw-r--r--tests/ui/unknown_attribute.stderr8
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/unknown_attribute.rs b/tests/ui/unknown_attribute.rs
new file mode 100644
index 00000000000..8d695692863
--- /dev/null
+++ b/tests/ui/unknown_attribute.rs
@@ -0,0 +1,3 @@
+#[clippy::unknown]
+#[clippy::cyclomatic_complexity = "1"]
+fn main() {}
diff --git a/tests/ui/unknown_attribute.stderr b/tests/ui/unknown_attribute.stderr
new file mode 100644
index 00000000000..47e37aed246
--- /dev/null
+++ b/tests/ui/unknown_attribute.stderr
@@ -0,0 +1,8 @@
+error: Usage of unknown attribute
+  --> $DIR/unknown_attribute.rs:1:11
+   |
+LL | #[clippy::unknown]
+   |           ^^^^^^^
+
+error: aborting due to previous error
+