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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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 17:02:10 +00:00
//~| ERROR cannot find derive macro `rustfmt` in this scope
struct S;
2019-09-08 01:34:24 +00: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`
}