Files
rust/tests/ui/auto-traits/auto-trait-validation.fixed

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

15 lines
443 B
Rust
Raw Normal View History

2021-10-03 17:58:10 +02:00
#![feature(auto_traits)]
2024-02-07 10:42:01 +08:00
#![allow(dead_code)]
2021-10-03 17:58:10 +02:00
//@ run-rustfix
auto trait Generic {}
//~^ ERROR auto traits cannot have generic parameters [E0567]
2021-10-03 17:58:10 +02:00
auto trait Bound {}
//~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
2021-10-03 17:58:10 +02:00
auto trait LifetimeBound {}
//~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
2021-10-03 17:58:10 +02:00
auto trait MyTrait { }
//~^ ERROR auto traits cannot have associated items [E0380]
2021-10-03 17:58:10 +02:00
fn main() {}