From c4eb7801565fe0c69f3f199f64db40dfdd084590 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Thu, 28 Feb 2019 16:47:00 +0100 Subject: [PATCH] Add test for unknown Clippy attributes --- tests/ui/unknown_attribute.rs | 3 +++ tests/ui/unknown_attribute.stderr | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/ui/unknown_attribute.rs create mode 100644 tests/ui/unknown_attribute.stderr diff --git a/tests/ui/unknown_attribute.rs b/tests/ui/unknown_attribute.rs new file mode 100644 index 000000000..8d6956928 --- /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 000000000..47e37aed2 --- /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 +