2024-03-09 14:32:36 -06:00
|
|
|
error[E0308]: mismatched types
|
2024-06-16 12:57:01 -05:00
|
|
|
--> $DIR/return-ty-mismatch-note.rs:5:6
|
2024-03-09 14:32:36 -06:00
|
|
|
|
|
|
|
|
LL | fn f<T>() -> (T,) {
|
|
|
|
| - expected this type parameter
|
|
|
|
LL | (0,)
|
|
|
|
| ^ expected type parameter `T`, found integer
|
|
|
|
|
|
|
|
|
= note: expected type parameter `T`
|
|
|
|
found type `{integer}`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-06-16 12:57:01 -05:00
|
|
|
--> $DIR/return-ty-mismatch-note.rs:9:6
|
2024-03-09 14:32:36 -06:00
|
|
|
|
|
|
|
|
LL | fn g<U, V>() -> (U, V) {
|
|
|
|
| - expected this type parameter
|
|
|
|
LL | (0, "foo")
|
|
|
|
| ^ expected type parameter `U`, found integer
|
|
|
|
|
|
|
|
|
= note: expected type parameter `U`
|
|
|
|
found type `{integer}`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-06-16 12:57:01 -05:00
|
|
|
--> $DIR/return-ty-mismatch-note.rs:9:9
|
2024-03-09 14:32:36 -06:00
|
|
|
|
|
|
|
|
LL | fn g<U, V>() -> (U, V) {
|
|
|
|
| - expected this type parameter
|
|
|
|
LL | (0, "foo")
|
|
|
|
| ^^^^^ expected type parameter `V`, found `&str`
|
|
|
|
|
|
|
|
|
= note: expected type parameter `V`
|
|
|
|
found reference `&'static str`
|
|
|
|
|
2024-06-16 12:57:01 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/return-ty-mismatch-note.rs:22:5
|
|
|
|
|
|
|
|
|
LL | fn k<T>(_t: &T) -> T {
|
|
|
|
| - - expected `T` because of return type
|
|
|
|
| |
|
|
|
|
| expected this type parameter
|
|
|
|
LL | _t
|
|
|
|
| ^^ expected type parameter `T`, found `&T`
|
|
|
|
|
|
|
|
|
= note: expected type parameter `_`
|
|
|
|
found reference `&_`
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2024-03-09 14:32:36 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|