summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
blob: d0a24a267fd4f3aab01b8e363eaa4799df463947 (plain)
1
2
3
4
5
6
7
8
9
10
error: lifetime may not live long enough
  --> $DIR/region-lbr-named-does-not-outlive-static.rs:9:5
   |
LL | fn foo<'a>(x: &'a u32) -> &'static u32 {
   |        -- lifetime `'a` defined here
LL |     &*x
   |     ^^^ returning this value requires that `'a` must outlive `'static`

error: aborting due to previous error