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 15:58:10 +00:00
// run-rustfix
auto trait Generic<T> {}
2017-12-04 22:55:14 +00:00
//~^ auto traits cannot have generic parameters [E0567]
auto trait Bound : Copy {}
2021-10-03 15:58:10 +00: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 15:58:10 +00:00
//~^ auto traits cannot have associated items [E0380]
fn main() {}