about summary refs log tree commit diff
path: root/tests/ui/auto-traits/auto-trait-validation.fixed
blob: b24dc1cb2c3d30b2ed64aff220273a34114d9fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![feature(auto_traits)]
#![allow(dead_code)]

//@ run-rustfix

auto trait Generic {}
//~^ ERROR auto traits cannot have generic parameters [E0567]
auto trait Bound {}
//~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
auto trait LifetimeBound {}
//~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
auto trait MyTrait {  }
//~^ ERROR auto traits cannot have associated items [E0380]
auto trait AssocTy {  }
//~^ ERROR auto traits cannot have associated items [E0380]
auto trait All {
    //~^ ERROR auto traits cannot have generic parameters [E0567]
    
}
// We can't test both generic params and super-traits because the suggestion span overlaps.
auto trait All2 {
    //~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
    
}
fn main() {}