]>
Commit | Line | Data |
---|---|---|
abe05a73 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/universal-mismatched-type.rs:4:5 |
abe05a73 | 3 | | |
0531ce1d | 4 | LL | fn foo(x: impl Debug) -> String { |
60c5eb7d XL |
5 | | ---------- ------ expected `std::string::String` because of return type |
6 | | | | |
7 | | this type parameter | |
532ac7d7 | 8 | LL | x |
60c5eb7d | 9 | | ^ expected struct `std::string::String`, found type parameter `impl Debug` |
abe05a73 | 10 | | |
60c5eb7d XL |
11 | = note: expected struct `std::string::String` |
12 | found type parameter `impl Debug` | |
e1599b0c XL |
13 | = help: type parameters must be constrained to match other types |
14 | = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters | |
abe05a73 XL |
15 | |
16 | error: aborting due to previous error | |
17 | ||
0531ce1d | 18 | For more information about this error, try `rustc --explain E0308`. |