]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/feature-gate-custom_attribute.rs
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow...
[rust.git] / tests / ui / feature-gates / feature-gate-custom_attribute.rs
1 // Check that literals in attributes parse just fine.
2
3 #[fake_attr] //~ ERROR cannot find attribute `fake_attr` in this scope
4 #[fake_attr(100)] //~ ERROR cannot find attribute `fake_attr` in this scope
5 #[fake_attr(1, 2, 3)] //~ ERROR cannot find attribute `fake_attr` in this scope
6 #[fake_attr("hello")] //~ ERROR cannot find attribute `fake_attr` in this scope
7 #[fake_attr(name = "hello")] //~ ERROR cannot find attribute `fake_attr` in this scope
8 #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR cannot find attribute `fake_attr` in th
9 #[fake_attr(key = "hello", val = 10)] //~ ERROR cannot find attribute `fake_attr` in this scop
10 #[fake_attr(key("hello"), val(10))] //~ ERROR cannot find attribute `fake_attr` in this scope
11 #[fake_attr(enabled = true, disabled = false)] //~ ERROR cannot find attribute `fake_attr` in
12 #[fake_attr(true)] //~ ERROR cannot find attribute `fake_attr` in this scope
13 #[fake_attr(pi = 3.14159)] //~ ERROR cannot find attribute `fake_attr` in this scope
14 #[fake_attr(b"hi")] //~ ERROR cannot find attribute `fake_attr` in this scope
15 #[fake_doc(r"doc")] //~ ERROR cannot find attribute `fake_doc` in this scope
16 struct Q {}
17
18 fn main() {}