]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lub-if.nll.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / lub-if.nll.stderr
1 error: unsatisfied lifetime constraints
2   --> $DIR/lub-if.rs:38:9
3    |
4 LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
5    |                 -- lifetime `'a` defined here
6 ...
7 LL |         s  //~ ERROR E0312
8    |         ^ returning this value requires that `'a` must outlive `'static`
9
10 error: unsatisfied lifetime constraints
11   --> $DIR/lub-if.rs:45:9
12    |
13 LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
14    |                 -- lifetime `'a` defined here
15 ...
16 LL |         s  //~ ERROR E0312
17    |         ^ returning this value requires that `'a` must outlive `'static`
18
19 error: aborting due to 2 previous errors
20