]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/universal-mismatched-type.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / universal-mismatched-type.stderr
CommitLineData
abe05a73 1error[E0308]: mismatched types
0731742a 2 --> $DIR/universal-mismatched-type.rs:4:5
abe05a73 3 |
0531ce1d 4LL | fn foo(x: impl Debug) -> String {
60c5eb7d
XL
5 | ---------- ------ expected `std::string::String` because of return type
6 | |
7 | this type parameter
532ac7d7 8LL | 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
16error: aborting due to previous error
17
0531ce1d 18For more information about this error, try `rustc --explain E0308`.