1 trait Trait {}
2
foo(_: impl &Trait)3 fn foo(_: impl &Trait) {}
4 //~^ ERROR expected a trait, found type
5
bar<T: &Trait>(_: T)6 fn bar<T: &Trait>(_: T) {}
7 //~^ ERROR expected a trait, found type
8
partially_correct_impl(_: impl &*const &Trait + Copy)9 fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
10 //~^ ERROR expected a trait, found type
11
foo_bad(_: impl &BadTrait)12 fn foo_bad(_: impl &BadTrait) {}
13 //~^ ERROR expected a trait, found type
14 //~^^ ERROR cannot find trait `BadTrait` in this scope
15
bar_bad<T: &BadTrait>(_: T)16 fn bar_bad<T: &BadTrait>(_: T) {}
17 //~^ ERROR expected a trait, found type
18 //~^^ ERROR cannot find trait `BadTrait` in this scope
19
partially_correct_impl_bad(_: impl &*const &BadTrait + Copy)20 fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
21 //~^ ERROR expected a trait, found type
22 //~^^ ERROR cannot find trait `BadTrait` in this scope
23
main()24 fn main() {}
25