]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/lub-match.stderr
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / nll / lub-match.stderr
1 error: lifetime may not live long enough
2   --> $DIR/lub-match.rs:30:13
3    |
4 LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
5    |                 -- lifetime `'a` defined here
6 ...
7 LL |             s
8    |             ^ returning this value requires that `'a` must outlive `'static`
9
10 error: lifetime may not live long enough
11   --> $DIR/lub-match.rs:40:13
12    |
13 LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
14    |                 -- lifetime `'a` defined here
15 ...
16 LL |             s
17    |             ^ returning this value requires that `'a` must outlive `'static`
18
19 error: aborting due to 2 previous errors
20