fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
636 B22 linesraw
1warning: unnecessary lifetime parameter `'a`
2  --> $DIR/static-lifetime-bound.rs:1:6
3   |
4LL | fn f<'a: 'static>(_: &'a i32) {}
5   |      ^^^^^^^^^^^
6   |
7   = help: you can use the `'static` lifetime directly, in place of `'a`
8
9error[E0597]: `x` does not live long enough
10  --> $DIR/static-lifetime-bound.rs:5:7
11   |
12LL |     f(&x);
13   |     --^^-
14   |     | |
15   |     | borrowed value does not live long enough
16   |     argument requires that `x` is borrowed for `'static`
17LL | }
18   | - `x` dropped here while still borrowed
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0597`.