From 0ee723edb54031afdd6e5f07a6daf19dcc34e665 Mon Sep 17 00:00:00 2001 From: Esteban Kuber Date: Tue, 12 Oct 2021 13:16:36 +0000 Subject: [PATCH] Update nll test --- .../ui/async-await/issues/issue-72312.nll.stderr | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/async-await/issues/issue-72312.nll.stderr diff --git a/src/test/ui/async-await/issues/issue-72312.nll.stderr b/src/test/ui/async-await/issues/issue-72312.nll.stderr new file mode 100644 index 00000000000..cf7723ada56 --- /dev/null +++ b/src/test/ui/async-await/issues/issue-72312.nll.stderr @@ -0,0 +1,15 @@ +error[E0521]: borrowed data escapes outside of associated function + --> $DIR/issue-72312.rs:13:24 + | +LL | pub async fn start(&self) { + | ----- `self` is a reference that is only valid in the associated function body +... +LL | require_static(async move { + | ________________________^ +LL | | &self; +LL | | }); + | |_________^ `self` escapes the associated function body here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0521`.