rust/tests/ui/tool-attributes/tool-attributes-misplaced-1.rs

19 lines
710 B
Rust
Raw Normal View History

type A = rustfmt; //~ ERROR expected type, found tool module `rustfmt`
type B = rustfmt::skip; //~ ERROR expected type, found tool attribute `rustfmt::skip`
#[derive(rustfmt)] //~ ERROR cannot find derive macro `rustfmt` in this scope
2020-01-08 11:02:10 -06:00
//~| ERROR cannot find derive macro `rustfmt` in this scope
struct S;
2019-09-07 20:34:24 -05:00
// Interpreted as an unstable custom attribute
#[rustfmt] //~ ERROR cannot find attribute `rustfmt` in this scope
fn check() {}
#[rustfmt::skip] // OK
fn main() {
rustfmt; //~ ERROR expected value, found tool module `rustfmt`
rustfmt!(); //~ ERROR cannot find macro `rustfmt` in this scope
rustfmt::skip; //~ ERROR expected value, found tool attribute `rustfmt::skip`
}