]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/issue-106694.stderr
Rollup merge of #106935 - TaKO8Ki:fix-104440, r=cjgillot
[rust.git] / tests / ui / generics / issue-106694.stderr
1 error: expected a trait, found type
2   --> $DIR/issue-106694.rs:3:16
3    |
4 LL | fn foo(_: impl &Trait) {}
5    |                ^^^^^^
6    |
7 help: consider removing the indirection
8    |
9 LL - fn foo(_: impl &Trait) {}
10 LL + fn foo(_: impl Trait) {}
11    |
12
13 error: expected a trait, found type
14   --> $DIR/issue-106694.rs:6:11
15    |
16 LL | fn bar<T: &Trait>(_: T) {}
17    |           ^^^^^^
18    |
19 help: consider removing the indirection
20    |
21 LL - fn bar<T: &Trait>(_: T) {}
22 LL + fn bar<T: Trait>(_: T) {}
23    |
24
25 error: expected a trait, found type
26   --> $DIR/issue-106694.rs:9:35
27    |
28 LL | fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
29    |                                   ^^^^^^^^^^^^^^
30    |
31 help: consider removing the indirection
32    |
33 LL - fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
34 LL + fn partially_correct_impl(_: impl Trait + Copy) {}
35    |
36
37 error: expected a trait, found type
38   --> $DIR/issue-106694.rs:12:20
39    |
40 LL | fn foo_bad(_: impl &BadTrait) {}
41    |                    ^^^^^^^^^
42    |
43 help: consider removing the indirection
44    |
45 LL - fn foo_bad(_: impl &BadTrait) {}
46 LL + fn foo_bad(_: impl BadTrait) {}
47    |
48
49 error: expected a trait, found type
50   --> $DIR/issue-106694.rs:16:15
51    |
52 LL | fn bar_bad<T: &BadTrait>(_: T) {}
53    |               ^^^^^^^^^
54    |
55 help: consider removing the indirection
56    |
57 LL - fn bar_bad<T: &BadTrait>(_: T) {}
58 LL + fn bar_bad<T: BadTrait>(_: T) {}
59    |
60
61 error: expected a trait, found type
62   --> $DIR/issue-106694.rs:20:39
63    |
64 LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
65    |                                       ^^^^^^^^^^^^^^^^^
66    |
67 help: consider removing the indirection
68    |
69 LL - fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
70 LL + fn partially_correct_impl_bad(_: impl BadTrait + Copy) {}
71    |
72
73 error[E0405]: cannot find trait `BadTrait` in this scope
74   --> $DIR/issue-106694.rs:12:21
75    |
76 LL | fn foo_bad(_: impl &BadTrait) {}
77    |                     ^^^^^^^^ not found in this scope
78
79 error[E0405]: cannot find trait `BadTrait` in this scope
80   --> $DIR/issue-106694.rs:16:16
81    |
82 LL | fn bar_bad<T: &BadTrait>(_: T) {}
83    |                ^^^^^^^^ not found in this scope
84
85 error[E0405]: cannot find trait `BadTrait` in this scope
86   --> $DIR/issue-106694.rs:20:48
87    |
88 LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
89    |                                                ^^^^^^^^ not found in this scope
90
91 error: aborting due to 9 previous errors
92
93 For more information about this error, try `rustc --explain E0405`.