From b4ad3363f3ce5facdaac7384892319914f119177 Mon Sep 17 00:00:00 2001 From: klutzy Date: Mon, 11 Nov 2013 17:51:27 +0900 Subject: [PATCH] Add test for unknown attribute lint --- src/test/compile-fail/lint-unknown-attr.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/test/compile-fail/lint-unknown-attr.rs diff --git a/src/test/compile-fail/lint-unknown-attr.rs b/src/test/compile-fail/lint-unknown-attr.rs new file mode 100644 index 00000000000..2ec7706addf --- /dev/null +++ b/src/test/compile-fail/lint-unknown-attr.rs @@ -0,0 +1,18 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// When denying at the crate level, be sure to not get random warnings from the +// injected intrinsics by the compiler. + +#[deny(attribute_usage)]; + +#[dance] mod a {} //~ ERROR: unknown attribute + +#[dance] fn main() {} //~ ERROR: unknown attribute