summary refs log tree commit diff
path: root/src/test/ui/nll/lub-if.nll.stderr
blob: 2fd6e69628d472c95e9df998d9d536880c0bef55 (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-if.rs:32:9
   |
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-if.rs:41:9
   |
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