]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lub-if.stderr
Auto merge of #81507 - weiznich:add_diesel_to_cargo_test, r=Mark-Simulacrum
[rust.git] / src / test / ui / lub-if.stderr
1 error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2   --> $DIR/lub-if.rs:28:9
3    |
4 LL |         s
5    |         ^
6    |
7    = note: ...the reference is valid for the static lifetime...
8 note: ...but the borrowed content is only valid for the lifetime `'a` as defined on the function body at 23:17
9   --> $DIR/lub-if.rs:23:17
10    |
11 LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
12    |                 ^^
13
14 error[E0312]: lifetime of reference outlives lifetime of borrowed content...
15   --> $DIR/lub-if.rs:35:9
16    |
17 LL |         s
18    |         ^
19    |
20    = note: ...the reference is valid for the static lifetime...
21 note: ...but the borrowed content is only valid for the lifetime `'a` as defined on the function body at 32:17
22   --> $DIR/lub-if.rs:32:17
23    |
24 LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
25    |                 ^^
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0312`.