fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.0 KiB29 linesraw
1error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2  --> $DIR/lub-match.rs:30:13
3   |
4LL |             s
5   |             ^
6   |
7   = note: ...the reference is valid for the static lifetime...
8note: ...but the borrowed content is only valid for the lifetime `'a` as defined on the function body at 25:17
9  --> $DIR/lub-match.rs:25:17
10   |
11LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
12   |                 ^^
13
14error[E0312]: lifetime of reference outlives lifetime of borrowed content...
15  --> $DIR/lub-match.rs:39:13
16   |
17LL |             s
18   |             ^
19   |
20   = note: ...the reference is valid for the static lifetime...
21note: ...but the borrowed content is only valid for the lifetime `'a` as defined on the function body at 35:17
22  --> $DIR/lub-match.rs:35:17
23   |
24LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
25   |                 ^^
26
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0312`.