@@ -10,6 +10,7 @@ LL | "this should not suggest impl Trait"
10
10
|
11
11
= note: expected type parameter `T`
12
12
found reference `&'static str`
13
+ = note: the caller chooses a type for `T` which can be different from `&'static str`
13
14
14
15
error[E0308]: mismatched types
15
16
--> $DIR/return-impl-trait-bad.rs:9:5
@@ -23,6 +24,7 @@ LL | "this will not suggest it, because that would probably be wrong"
23
24
|
24
25
= note: expected type parameter `T`
25
26
found reference `&'static str`
27
+ = note: the caller chooses a type for `T` which can be different from `&'static str`
26
28
27
29
error[E0308]: mismatched types
28
30
--> $DIR/return-impl-trait-bad.rs:17:5
@@ -37,6 +39,7 @@ LL | "don't suggest this, because Option<T> places additional constraints"
37
39
|
38
40
= note: expected type parameter `T`
39
41
found reference `&'static str`
42
+ = note: the caller chooses a type for `T` which can be different from `&'static str`
40
43
41
44
error[E0308]: mismatched types
42
45
--> $DIR/return-impl-trait-bad.rs:28:5
@@ -53,6 +56,7 @@ LL | "don't suggest this, because the generic param is used in the bound."
53
56
|
54
57
= note: expected type parameter `T`
55
58
found reference `&'static str`
59
+ = note: the caller chooses a type for `T` which can be different from `&'static str`
56
60
57
61
error: aborting due to 4 previous errors
58
62
0 commit comments