]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-expected-type/expect-region-supply-region-2.nll.stderr
Update tests
[rust.git] / src / test / ui / closures / closure-expected-type / expect-region-supply-region-2.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/expect-region-supply-region-2.rs:14:30
3    |
4 LL | fn expect_bound_supply_named<'x>() {
5    |                              -- lifetime `'x` defined here
6 ...
7 LL |     closure_expecting_bound(|x: &'x u32| {
8    |                              ^  - let's call the lifetime of this reference `'1`
9    |                              |
10    |                              requires that `'1` must outlive `'x`
11
12 error: lifetime may not live long enough
13   --> $DIR/expect-region-supply-region-2.rs:14:30
14    |
15 LL | fn expect_bound_supply_named<'x>() {
16    |                              -- lifetime `'x` defined here
17 ...
18 LL |     closure_expecting_bound(|x: &'x u32| {
19    |                              ^ requires that `'x` must outlive `'static`
20    |
21    = help: consider replacing `'x` with `'static`
22
23 error: aborting due to 2 previous errors
24