]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / regions / regions-assoc-type-static-bound-in-trait-not-met.stderr
1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2   --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:19:10
3    |
4 LL | impl<'a> Foo for &'a i32 {
5    |          ^^^
6    |
7 note: first, the lifetime cannot outlive the lifetime 'a as defined on the impl at 19:6...
8   --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:19:6
9    |
10 LL | impl<'a> Foo for &'a i32 {
11    |      ^^
12    = note: ...so that the types are compatible:
13            expected Foo
14               found Foo
15    = note: but, the lifetime must be valid for the static lifetime...
16 note: ...so that the type `&i32` will meet its required lifetime bounds
17   --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:19:10
18    |
19 LL | impl<'a> Foo for &'a i32 {
20    |          ^^^
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0495`.