]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-custom_attribute.rs
Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN
[rust.git] / src / test / ui / feature-gates / feature-gate-custom_attribute.rs
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.
4 //
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.
10
11 // Check that literals in attributes parse just fine.
12
13
14 #![allow(dead_code)]
15 #![allow(unused_variables)]
16
17 #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown
18 #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown
19 #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown
20 #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown
21 #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown
22 #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown
23 #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown
24 #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown
25 #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown
26 #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown
27 #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown
28 #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown
29 #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
30 struct Q {  }
31
32
33 fn main() { }