summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics/issue-106694.stderr
blob: 235b8982a99c6e9346308a20a0ce4327534414b6 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
error: expected a trait, found type
  --> $DIR/issue-106694.rs:3:16
   |
LL | fn foo(_: impl &Trait) {}
   |                ^^^^^^
   |
help: consider removing the indirection
   |
LL - fn foo(_: impl &Trait) {}
LL + fn foo(_: impl Trait) {}
   |

error: expected a trait, found type
  --> $DIR/issue-106694.rs:6:11
   |
LL | fn bar<T: &Trait>(_: T) {}
   |           ^^^^^^
   |
help: consider removing the indirection
   |
LL - fn bar<T: &Trait>(_: T) {}
LL + fn bar<T: Trait>(_: T) {}
   |

error: expected a trait, found type
  --> $DIR/issue-106694.rs:9:35
   |
LL | fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
   |                                   ^^^^^^^^^^^^^^
   |
help: consider removing the indirection
   |
LL - fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
LL + fn partially_correct_impl(_: impl Trait + Copy) {}
   |

error: expected a trait, found type
  --> $DIR/issue-106694.rs:12:20
   |
LL | fn foo_bad(_: impl &BadTrait) {}
   |                    ^^^^^^^^^
   |
help: consider removing the indirection
   |
LL - fn foo_bad(_: impl &BadTrait) {}
LL + fn foo_bad(_: impl BadTrait) {}
   |

error: expected a trait, found type
  --> $DIR/issue-106694.rs:16:15
   |
LL | fn bar_bad<T: &BadTrait>(_: T) {}
   |               ^^^^^^^^^
   |
help: consider removing the indirection
   |
LL - fn bar_bad<T: &BadTrait>(_: T) {}
LL + fn bar_bad<T: BadTrait>(_: T) {}
   |

error: expected a trait, found type
  --> $DIR/issue-106694.rs:20:39
   |
LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
   |                                       ^^^^^^^^^^^^^^^^^
   |
help: consider removing the indirection
   |
LL - fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
LL + fn partially_correct_impl_bad(_: impl BadTrait + Copy) {}
   |

error[E0405]: cannot find trait `BadTrait` in this scope
  --> $DIR/issue-106694.rs:12:21
   |
LL | fn foo_bad(_: impl &BadTrait) {}
   |                     ^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `BadTrait` in this scope
  --> $DIR/issue-106694.rs:16:16
   |
LL | fn bar_bad<T: &BadTrait>(_: T) {}
   |                ^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `BadTrait` in this scope
  --> $DIR/issue-106694.rs:20:48
   |
LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
   |                                                ^^^^^^^^ not found in this scope

error: aborting due to 9 previous errors

For more information about this error, try `rustc --explain E0405`.