|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/return-ty-mismatch-note.rs:4:6 |
| 3 | + | |
| 4 | +LL | fn f<T>() -> (T,) { |
| 5 | + | - expected this type parameter |
| 6 | +LL | (0,) |
| 7 | + | ^ expected type parameter `T`, found integer |
| 8 | + | |
| 9 | + = note: expected type parameter `T` |
| 10 | + found type `{integer}` |
| 11 | + = note: the caller chooses a type for `T` which can be different from `{integer}` |
| 12 | + |
| 13 | +error[E0308]: mismatched types |
| 14 | + --> $DIR/return-ty-mismatch-note.rs:8:6 |
| 15 | + | |
| 16 | +LL | fn g<U, V>() -> (U, V) { |
| 17 | + | - expected this type parameter |
| 18 | +LL | (0, "foo") |
| 19 | + | ^ expected type parameter `U`, found integer |
| 20 | + | |
| 21 | + = note: expected type parameter `U` |
| 22 | + found type `{integer}` |
| 23 | + = note: the caller chooses a type for `U` which can be different from `{integer}` |
| 24 | + |
| 25 | +error[E0308]: mismatched types |
| 26 | + --> $DIR/return-ty-mismatch-note.rs:8:9 |
| 27 | + | |
| 28 | +LL | fn g<U, V>() -> (U, V) { |
| 29 | + | - expected this type parameter |
| 30 | +LL | (0, "foo") |
| 31 | + | ^^^^^ expected type parameter `V`, found `&str` |
| 32 | + | |
| 33 | + = note: expected type parameter `V` |
| 34 | + found reference `&'static str` |
| 35 | + = note: the caller chooses a type for `V` which can be different from `&'static str` |
| 36 | + |
| 37 | +error: aborting due to 3 previous errors |
| 38 | + |
| 39 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments