1 error: expected a trait, found type
2 --> $DIR/issue-106694.rs:3:16
4 LL | fn foo(_: impl &Trait) {}
7 help: consider removing the indirection
9 LL - fn foo(_: impl &Trait) {}
10 LL + fn foo(_: impl Trait) {}
13 error: expected a trait, found type
14 --> $DIR/issue-106694.rs:6:11
16 LL | fn bar<T: &Trait>(_: T) {}
19 help: consider removing the indirection
21 LL - fn bar<T: &Trait>(_: T) {}
22 LL + fn bar<T: Trait>(_: T) {}
25 error: expected a trait, found type
26 --> $DIR/issue-106694.rs:9:35
28 LL | fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
31 help: consider removing the indirection
33 LL - fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
34 LL + fn partially_correct_impl(_: impl Trait + Copy) {}
37 error: expected a trait, found type
38 --> $DIR/issue-106694.rs:12:20
40 LL | fn foo_bad(_: impl &BadTrait) {}
43 help: consider removing the indirection
45 LL - fn foo_bad(_: impl &BadTrait) {}
46 LL + fn foo_bad(_: impl BadTrait) {}
49 error: expected a trait, found type
50 --> $DIR/issue-106694.rs:16:15
52 LL | fn bar_bad<T: &BadTrait>(_: T) {}
55 help: consider removing the indirection
57 LL - fn bar_bad<T: &BadTrait>(_: T) {}
58 LL + fn bar_bad<T: BadTrait>(_: T) {}
61 error: expected a trait, found type
62 --> $DIR/issue-106694.rs:20:39
64 LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
67 help: consider removing the indirection
69 LL - fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
70 LL + fn partially_correct_impl_bad(_: impl BadTrait + Copy) {}
73 error[E0405]: cannot find trait `BadTrait` in this scope
74 --> $DIR/issue-106694.rs:12:21
76 LL | fn foo_bad(_: impl &BadTrait) {}
77 | ^^^^^^^^ not found in this scope
79 error[E0405]: cannot find trait `BadTrait` in this scope
80 --> $DIR/issue-106694.rs:16:16
82 LL | fn bar_bad<T: &BadTrait>(_: T) {}
83 | ^^^^^^^^ not found in this scope
85 error[E0405]: cannot find trait `BadTrait` in this scope
86 --> $DIR/issue-106694.rs:20:48
88 LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
89 | ^^^^^^^^ not found in this scope
91 error: aborting due to 9 previous errors
93 For more information about this error, try `rustc --explain E0405`.