]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hrtb/hrtb-just-for-static.stderr
modify leak-check to track only outgoing edges from placeholders
[rust.git] / src / test / ui / hrtb / hrtb-just-for-static.stderr
1 error: implementation of `Foo` is not general enough
2   --> $DIR/hrtb-just-for-static.rs:24:5
3    |
4 LL | / trait Foo<X> {
5 LL | |     fn foo(&self, x: X) { }
6 LL | | }
7    | |_- trait `Foo` defined here
8 ...
9 LL |       want_hrtb::<StaticInt>()
10    |       ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
11    |
12    = note: `StaticInt` must implement `Foo<&'0 isize>`, for any lifetime `'0`...
13    = note: ...but `StaticInt` actually implements `Foo<&'1 isize>`, for some specific lifetime `'1`
14
15 error[E0277]: the trait bound `for<'a> &'a u32: Foo<&'a isize>` is not satisfied
16   --> $DIR/hrtb-just-for-static.rs:30:17
17    |
18 LL | fn want_hrtb<T>()
19    |    --------- required by a bound in this
20 LL |     where T : for<'a> Foo<&'a isize>
21    |               ---------------------- required by this bound in `want_hrtb`
22 ...
23 LL |     want_hrtb::<&'a u32>()
24    |                 ^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `&'a u32`
25    |
26    = help: the following implementations were found:
27              <&'a u32 as Foo<&'a isize>>
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0277`.