]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tool-attributes/tool-attributes-misplaced-1.rs
Merge commit 'a8385522ade6f67853edac730b5bf164ddb298fd' into simd-remove-autosplats
[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                    //~| ERROR cannot find derive macro `rustfmt` in this scope
6 struct S;
7
8 // Interpreted as an unstable custom attribute
9 #[rustfmt] //~ ERROR cannot find attribute `rustfmt` in this scope
10 fn check() {}
11
12 #[rustfmt::skip] // OK
13 fn main() {
14     rustfmt; //~ ERROR expected value, found tool module `rustfmt`
15     rustfmt!(); //~ ERROR cannot find macro `rustfmt` in this scope
16
17     rustfmt::skip; //~ ERROR expected value, found tool attribute `rustfmt::skip`
18 }