fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
792 B23 linesraw
1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2  --> $DIR/constant-in-expr-inherent-1.rs:8:5
3   |
4LL |     <Foo<'a>>::C
5   |     ^^^^^^^^^^^^
6   |
7note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 7:8...
8  --> $DIR/constant-in-expr-inherent-1.rs:7:8
9   |
10LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
11   |        ^^
12   = note: ...so that the types are compatible:
13           expected Foo<'_>
14              found Foo<'a>
15   = note: but, the lifetime must be valid for the static lifetime...
16note: ...so that reference does not outlive borrowed content
17  --> $DIR/constant-in-expr-inherent-1.rs:8:5
18   |
19LL |     <Foo<'a>>::C
20   |     ^^^^^^^^^^^^
21
22error: aborting due to previous error
23