1 // Various checks that deprecation attributes are used correctly
3 mod bogus_attribute_types_1 {
4 #[deprecated(since = "a", note = "a", reason)] //~ ERROR unknown meta item 'reason'
7 #[deprecated(since = "a", note)] //~ ERROR incorrect meta item
10 #[deprecated(since, note = "a")] //~ ERROR incorrect meta item
13 #[deprecated(since = "a", note(b))] //~ ERROR incorrect meta item
16 #[deprecated(since(b), note = "a")] //~ ERROR incorrect meta item
19 #[deprecated(note = b"test")] //~ ERROR literal in `deprecated` value must be a string
22 #[deprecated("test")] //~ ERROR item in `deprecated` must be a key/value pair
26 #[deprecated(since = "a", note = "b")]
27 #[deprecated(since = "a", note = "b")] //~ ERROR multiple deprecated attributes
30 #[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items
35 #[deprecated = "hello"] //~ ERROR this `#[deprecated]` annotation has no effect
37 fn default() -> Self {