about summary refs log tree commit diff
path: root/tests/ui/async-await/async-borrowck-escaping-block-error.stderr
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-08-12 11:51:46 +0200
committerlcnr <rust@lcnr.de>2025-08-20 11:04:38 +0200
commit8365ad17da97bdc774aa167ad0d52c35d04745a0 (patch)
treebdcfcf291e0b7f28da7f1e82a56bda1b5fb84c7c /tests/ui/async-await/async-borrowck-escaping-block-error.stderr
parente255a9b28af44240686928df243f3afbf6999ad1 (diff)
downloadrust-8365ad17da97bdc774aa167ad0d52c35d04745a0.tar.gz
rust-8365ad17da97bdc774aa167ad0d52c35d04745a0.zip
handle opaque types before region inference
Diffstat (limited to 'tests/ui/async-await/async-borrowck-escaping-block-error.stderr')
-rw-r--r--tests/ui/async-await/async-borrowck-escaping-block-error.stderr6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/ui/async-await/async-borrowck-escaping-block-error.stderr b/tests/ui/async-await/async-borrowck-escaping-block-error.stderr
index 8410e7eca57..6ea03c99aa0 100644
--- a/tests/ui/async-await/async-borrowck-escaping-block-error.stderr
+++ b/tests/ui/async-await/async-borrowck-escaping-block-error.stderr
@@ -6,11 +6,7 @@ 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
-   |
-LL |     Box::new(async { x } )
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   = note: async blocks are not executed immediately and must either take a reference or ownership of outside variables they use
 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 } )