1
1
error[E0308]: mismatched types
2
- --> $DIR/return-ty-mismatch-note.rs:4 :6
2
+ --> $DIR/return-ty-mismatch-note.rs:5 :6
3
3
|
4
4
LL | fn f<T>() -> (T,) {
5
5
| - expected this type parameter
@@ -10,7 +10,7 @@ LL | (0,)
10
10
found type `{integer}`
11
11
12
12
error[E0308]: mismatched types
13
- --> $DIR/return-ty-mismatch-note.rs:8 :6
13
+ --> $DIR/return-ty-mismatch-note.rs:9 :6
14
14
|
15
15
LL | fn g<U, V>() -> (U, V) {
16
16
| - expected this type parameter
@@ -21,7 +21,7 @@ LL | (0, "foo")
21
21
found type `{integer}`
22
22
23
23
error[E0308]: mismatched types
24
- --> $DIR/return-ty-mismatch-note.rs:8 :9
24
+ --> $DIR/return-ty-mismatch-note.rs:9 :9
25
25
|
26
26
LL | fn g<U, V>() -> (U, V) {
27
27
| - expected this type parameter
@@ -31,6 +31,19 @@ LL | (0, "foo")
31
31
= note: expected type parameter `V`
32
32
found reference `&'static str`
33
33
34
- error: aborting due to 3 previous errors
34
+ error[E0308]: mismatched types
35
+ --> $DIR/return-ty-mismatch-note.rs:22:5
36
+ |
37
+ LL | fn k<T>(_t: &T) -> T {
38
+ | - - expected `T` because of return type
39
+ | |
40
+ | expected this type parameter
41
+ LL | _t
42
+ | ^^ expected type parameter `T`, found `&T`
43
+ |
44
+ = note: expected type parameter `_`
45
+ found reference `&_`
46
+
47
+ error: aborting due to 4 previous errors
35
48
36
49
For more information about this error, try `rustc --explain E0308`.
0 commit comments