]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/self-referential.stderr
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / ui / type-alias-impl-trait / self-referential.stderr
1 error[E0277]: can't compare `&i32` with `Bar<'b, 'a>`
2   --> $DIR/self-referential.rs:5:31
3    |
4 LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
5    |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'a>`
6 LL |
7 LL |     i
8    |     - return type was inferred to be `&i32` here
9    |
10    = help: the trait `PartialEq<Bar<'b, 'a>>` is not implemented for `&i32`
11    = help: the trait `PartialEq` is implemented for `i32`
12
13 error[E0277]: can't compare `&i32` with `(i32, &i32)`
14   --> $DIR/self-referential.rs:12:31
15    |
16 LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
17    |                               ^^^^^^^^^^^ no implementation for `&i32 == (i32, &i32)`
18 LL |
19 LL |     (42, i)
20    |     ------- return type was inferred to be `(i32, &i32)` here
21    |
22    = help: the trait `PartialEq<(i32, &i32)>` is not implemented for `&i32`
23    = help: the trait `PartialEq` is implemented for `i32`
24
25 error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0})`
26   --> $DIR/self-referential.rs:19:31
27    |
28 LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
29    |                               ^^^^^^^^^^^ no implementation for `&i32 == (i32, Moo<'b, 'a>::{opaque#0})`
30 LL |
31 LL |     (42, i)
32    |     ------- return type was inferred to be `(i32, &i32)` here
33    |
34    = help: the trait `PartialEq<(i32, Moo<'b, 'a>::{opaque#0})>` is not implemented for `&i32`
35    = help: the trait `PartialEq` is implemented for `i32`
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0277`.