summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
blob: 36478e723cced9353ac5656d2705b6c19426177d (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 1 previous error