]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tool-attributes/tool-attributes-misplaced-1.rs
Rollup merge of #61632 - alexcrichton:azure-pipelines-cpu, r=pietroalbini
[rust.git] / src / test / ui / tool-attributes / tool-attributes-misplaced-1.rs
1 type A = rustfmt; //~ ERROR expected type, found tool module `rustfmt`
2 type B = rustfmt::skip; //~ ERROR expected type, found tool attribute `rustfmt::skip`
3
4 #[derive(rustfmt)] //~ ERROR cannot find derive macro `rustfmt` in this scope
5 struct S;
6
7 // Interpreted as a feature gated custom attribute
8 #[rustfmt] //~ ERROR attribute `rustfmt` is currently unknown
9 fn check() {}
10
11 #[rustfmt::skip] // OK
12 fn main() {
13     rustfmt; //~ ERROR expected value, found tool module `rustfmt`
14     rustfmt!(); //~ ERROR cannot find macro `rustfmt!` in this scope
15
16     rustfmt::skip; //~ ERROR expected value, found tool attribute `rustfmt::skip`
17 }