about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2022-07-24 11:16:00 -0700
committerDavid Tolnay <dtolnay@gmail.com>2022-07-24 11:16:00 -0700
commit4d65048d4105da9b841c4d79aecdddf11bfc925e (patch)
treee6dd6d80fb1a875912632963da3494a361725b90
parentf1ca69d2453710587804b830182f3de76d9a9e70 (diff)
downloadrust-4d65048d4105da9b841c4d79aecdddf11bfc925e.tar.gz
rust-4d65048d4105da9b841c4d79aecdddf11bfc925e.zip
Regression in issue 99684 fixed
-rw-r--r--src/test/ui/macros/format-args-temporaries-async.rs5
-rw-r--r--src/test/ui/macros/format-args-temporaries-async.stderr27
2 files changed, 1 insertions, 31 deletions
diff --git a/src/test/ui/macros/format-args-temporaries-async.rs b/src/test/ui/macros/format-args-temporaries-async.rs
index fc2e5e2190f..d959329b9fc 100644
--- a/src/test/ui/macros/format-args-temporaries-async.rs
+++ b/src/test/ui/macros/format-args-temporaries-async.rs
@@ -1,5 +1,4 @@
-// FIXME: check-pass
-// check-fail
+// check-pass
 // edition:2021
 
 use std::fmt::{self, Display};
@@ -30,9 +29,7 @@ impl<'a, T> Future for WriteFmtFuture<'a, T> {
 
 async fn async_main() {
     let _write = write!(&mut AsyncStdout, "...").await;
-    //~^ ERROR temporary value dropped while borrowed
     let _writeln = writeln!(&mut AsyncStdout, "...").await;
-    //~^ ERROR temporary value dropped while borrowed
 }
 
 fn main() {
diff --git a/src/test/ui/macros/format-args-temporaries-async.stderr b/src/test/ui/macros/format-args-temporaries-async.stderr
deleted file mode 100644
index 73019d7eb6e..00000000000
--- a/src/test/ui/macros/format-args-temporaries-async.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0716]: temporary value dropped while borrowed
-  --> $DIR/format-args-temporaries-async.rs:32:30
-   |
-LL |     let _write = write!(&mut AsyncStdout, "...").await;
-   |                  ------------^^^^^^^^^^^--------
-   |                  |           |
-   |                  |           creates a temporary which is freed while still in use
-   |                  temporary value is freed at the end of this statement
-   |                  borrow later used here
-   |
-   = note: consider using a `let` binding to create a longer lived value
-
-error[E0716]: temporary value dropped while borrowed
-  --> $DIR/format-args-temporaries-async.rs:34:34
-   |
-LL |     let _writeln = writeln!(&mut AsyncStdout, "...").await;
-   |                    --------------^^^^^^^^^^^--------
-   |                    |             |
-   |                    |             creates a temporary which is freed while still in use
-   |                    temporary value is freed at the end of this statement
-   |                    borrow later used here
-   |
-   = note: consider using a `let` binding to create a longer lived value
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0716`.