diff options
Diffstat (limited to 'src/test/ui/async-await/async-borrowck-escaping-block-error.stderr')
| -rw-r--r-- | src/test/ui/async-await/async-borrowck-escaping-block-error.stderr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr b/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr index f21c8115124..44d60c1d80d 100644 --- a/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr +++ b/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr @@ -8,10 +8,10 @@ LL | Box::new(async { x } ) | may outlive borrowed value `x` | note: async block is returned here - --> $DIR/async-borrowck-escaping-block-error.rs:6:5 + --> $DIR/async-borrowck-escaping-block-error.rs:4:20 | -LL | Box::new(async { x } ) - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | fn test_boxed() -> Box<impl std::future::Future<Output = u32>> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to force the async block to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | Box::new(async move { x } ) |
