Skip to content

Commit 1fad953

Browse files
committed
Fully stabilize NLL
1 parent 5730482 commit 1fad953

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

tests/ui/crashes/ice-6256.stderr

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
error[E0308]: mismatched types
2-
--> $DIR/ice-6256.rs:13:28
1+
error[E0521]: borrowed data escapes outside of closure
2+
--> $DIR/ice-6256.rs:13:26
33
|
44
LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
5-
| ^^^^ lifetime mismatch
6-
|
7-
= note: expected reference `&(dyn TT + 'static)`
8-
found reference `&dyn TT`
9-
note: the anonymous lifetime #1 defined here...
10-
--> $DIR/ice-6256.rs:13:13
11-
|
12-
LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
13-
| ^^^^^^^^^^^^^^^^^^^^^
14-
= note: ...does not necessarily outlive the static lifetime
5+
| - - ^^^^^^^^
6+
| | | |
7+
| | | `x` escapes the closure body here
8+
| | | argument requires that `'1` must outlive `'static`
9+
| | let's call the lifetime of this reference `'1`
10+
| `x` is a reference that is only valid in the closure body
1511

1612
error: aborting due to previous error
1713

18-
For more information about this error, try `rustc --explain E0308`.
14+
For more information about this error, try `rustc --explain E0521`.

0 commit comments

Comments
 (0)