fork/rust

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

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

1.40.0
630 B20 linesraw
1error: lifetime may not live long enough
2  --> $DIR/lub-if.rs:28:9
3   |
4LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
5   |                 -- lifetime `'a` defined here
6...
7LL |         s
8   |         ^ returning this value requires that `'a` must outlive `'static`
9
10error: lifetime may not live long enough
11  --> $DIR/lub-if.rs:35:9
12   |
13LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
14   |                 -- lifetime `'a` defined here
15...
16LL |         s
17   |         ^ returning this value requires that `'a` must outlive `'static`
18
19error: aborting due to 2 previous errors
20