summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/lub-match.stderr
blob: 208ec07a1a11aef2fd7f550a50656d8a96fd3f24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
error: lifetime may not live long enough
  --> $DIR/lub-match.rs:30:13
   |
LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
   |                 -- lifetime `'a` defined here
...
LL |             s
   |             ^ returning this value requires that `'a` must outlive `'static`

error: lifetime may not live long enough
  --> $DIR/lub-match.rs:40:13
   |
LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
   |                 -- lifetime `'a` defined here
...
LL |             s
   |             ^ returning this value requires that `'a` must outlive `'static`

error: aborting due to 2 previous errors