]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/self-referential-4.stderr
Rollup merge of #99064 - lyming2007:issue-97687-fix, r=estebank
[rust.git] / src / test / ui / type-alias-impl-trait / self-referential-4.stderr
1 error[E0277]: can't compare `&i32` with `Bar<'b, 'static>`
2   --> $DIR/self-referential-4.rs:5:31
3    |
4 LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
5    |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'static>`
6 LL |     i
7    |     - return type was inferred to be `&i32` here
8    |
9    = help: the trait `PartialEq<Bar<'b, 'static>>` is not implemented for `&i32`
10    = help: the following other types implement trait `PartialEq<Rhs>`:
11              f32
12              f64
13              i128
14              i16
15              i32
16              i64
17              i8
18              isize
19            and 6 others
20
21 error[E0277]: can't compare `&i32` with `Foo<'static, 'b>`
22   --> $DIR/self-referential-4.rs:11:31
23    |
24 LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
25    |                               ^^^^^^^^^^^ no implementation for `&i32 == Foo<'static, 'b>`
26 LL |     i
27    |     - return type was inferred to be `&i32` here
28    |
29    = help: the trait `PartialEq<Foo<'static, 'b>>` is not implemented for `&i32`
30    = help: the following other types implement trait `PartialEq<Rhs>`:
31              f32
32              f64
33              i128
34              i16
35              i32
36              i64
37              i8
38              isize
39            and 6 others
40
41 error[E0277]: can't compare `&i32` with `Moo<'static, 'a>`
42   --> $DIR/self-referential-4.rs:17:31
43    |
44 LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
45    |                               ^^^^^^^^^^^ no implementation for `&i32 == Moo<'static, 'a>`
46 LL |     i
47    |     - return type was inferred to be `&i32` here
48    |
49    = help: the trait `PartialEq<Moo<'static, 'a>>` is not implemented for `&i32`
50    = help: the following other types implement trait `PartialEq<Rhs>`:
51              f32
52              f64
53              i128
54              i16
55              i32
56              i64
57              i8
58              isize
59            and 6 others
60
61 error: aborting due to 3 previous errors
62
63 For more information about this error, try `rustc --explain E0277`.