rust/tests/ui/auto-traits/auto-trait-validation.rs

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

14 lines
428 B
Rust
Raw Normal View History

#![feature(auto_traits)]
2021-10-03 23:58:10 +08:00
// run-rustfix
auto trait Generic<T> {}
2017-12-05 06:55:14 +08:00
//~^ auto traits cannot have generic parameters [E0567]
auto trait Bound : Copy {}
2021-10-03 23:58:10 +08:00
//~^ auto traits cannot have super traits or lifetime bounds [E0568]
auto trait LifetimeBound : 'static {}
//~^ auto traits cannot have super traits or lifetime bounds [E0568]
auto trait MyTrait { fn foo() {} }
2021-10-03 23:58:10 +08:00
//~^ auto traits cannot have associated items [E0380]
fn main() {}