]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-params-in-different-spaces-3.stderr
Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa
[rust.git] / src / test / ui / type / type-params-in-different-spaces-3.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-params-in-different-spaces-3.rs:3:9
3    |
4 LL | trait Tr : Sized {
5    | ---------------- expected type parameter
6 LL |     fn test<X>(u: X) -> Self {
7    |             -           ---- expected `Self` because of return type
8    |             |
9    |             found type parameter
10 LL |         u
11    |         ^ expected type parameter `Self`, found type parameter `X`
12    |
13    = note: expected type parameter `Self`
14               found type parameter `X`
15    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
16    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0308`.