1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Various checks that deprecation attributes are used correctly
13 mod bogus_attribute_types_1 {
14 #[deprecated(since = "a", note = "a", reason)] //~ ERROR unknown meta item 'reason'
17 #[deprecated(since = "a", note)] //~ ERROR incorrect meta item
20 #[deprecated(since, note = "a")] //~ ERROR incorrect meta item
23 #[deprecated(since = "a", note(b))] //~ ERROR incorrect meta item
26 #[deprecated(since(b), note = "a")] //~ ERROR incorrect meta item
30 #[deprecated(since = "a", note = "b")]
31 #[deprecated(since = "a", note = "b")]
32 fn multiple1() { } //~ ERROR multiple deprecated attributes
34 #[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items