about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/async-await/issues/issue-72312.nll.stderr15
1 files changed, 15 insertions, 0 deletions
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`.