]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-assoc-type-static-bound-in-trait-not-met.stderr
CommitLineData
b7449926 1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
0731742a 2 --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:9:10
b7449926
XL
3 |
4LL | impl<'a> Foo for &'a i32 {
5 | ^^^
6 |
e74abb32 7note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 9:6...
0731742a 8 --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:9:6
b7449926
XL
9 |
10LL | impl<'a> Foo for &'a i32 {
11 | ^^
60c5eb7d
XL
12note: ...so that the types are compatible
13 --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:9:10
14 |
15LL | impl<'a> Foo for &'a i32 {
16 | ^^^
17 = note: expected `Foo`
18 found `Foo`
b7449926
XL
19 = note: but, the lifetime must be valid for the static lifetime...
20note: ...so that the type `&i32` will meet its required lifetime bounds
0731742a 21 --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:9:10
b7449926
XL
22 |
23LL | impl<'a> Foo for &'a i32 {
24 | ^^^
25
26error: aborting due to previous error
27
e74abb32 28For more information about this error, try `rustc --explain E0495`.