]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/async-await/issues/issue-62097.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / async-await / issues / issue-62097.rs
index 66ebbd83ffa9e4546a0fcfd06b437a658b245dc1..a24c84cffc718b72a51d760d274940d041f2e6c1 100644 (file)
@@ -9,8 +9,10 @@ where
 struct Struct;
 
 impl Struct {
-    pub async fn run_dummy_fn(&self) { //~ ERROR E0759
+    pub async fn run_dummy_fn(&self) {
         foo(|| self.bar()).await;
+        //~^ ERROR closure may outlive the current function
+        //~| ERROR borrowed data escapes outside of associated function
     }
 
     pub fn bar(&self) {}