about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2025-05-07 17:42:04 +0200
committerMara Bos <m-ou.se@m-ou.se>2025-06-18 10:20:20 +0200
commitddd9ee9756643dc3ed28c4fc9da4815fe4a37f1d (patch)
tree24a0b0e89a2157e15645331267b4253c3e5aa0e4
parent5b763fb1b7a06393c5dc21502ac0b28776ce058f (diff)
downloadrust-ddd9ee9756643dc3ed28c4fc9da4815fe4a37f1d.tar.gz
rust-ddd9ee9756643dc3ed28c4fc9da4815fe4a37f1d.zip
Remove outdated test.
We no longer error in this case!
-rw-r--r--src/tools/tidy/src/issues.txt1
-rw-r--r--tests/ui/borrowck/issue-114374-invalid-help-fmt-args.rs16
-rw-r--r--tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr31
3 files changed, 0 insertions, 48 deletions
diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt
index 045f2f0692a..b3517b2e9da 100644
--- a/src/tools/tidy/src/issues.txt
+++ b/src/tools/tidy/src/issues.txt
@@ -305,7 +305,6 @@ ui/borrowck/issue-104639-lifetime-order.rs
 ui/borrowck/issue-10876.rs
 ui/borrowck/issue-109271-pass-self-into-closure.rs
 ui/borrowck/issue-111554.rs
-ui/borrowck/issue-114374-invalid-help-fmt-args.rs
 ui/borrowck/issue-11493.rs
 ui/borrowck/issue-115259-suggest-iter-mut.rs
 ui/borrowck/issue-119915-bad-clone-suggestion.rs
diff --git a/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.rs b/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.rs
deleted file mode 100644
index 4a6c2f9ed06..00000000000
--- a/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![allow(dead_code)]
-
-fn bar<'a>(_: std::fmt::Arguments<'a>) {}
-fn main() {
-    let x = format_args!("a {} {} {}.", 1, format_args!("b{}!", 2), 3);
-    //~^ ERROR temporary value dropped while borrowed
-
-    bar(x);
-
-    let foo = format_args!("{}", "hi");
-    //~^ ERROR temporary value dropped while borrowed
-    bar(foo);
-
-    let foo = format_args!("hi"); // no placeholder in arguments, so no error
-    bar(foo);
-}
diff --git a/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr b/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr
deleted file mode 100644
index 30f292f71a2..00000000000
--- a/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-114374-invalid-help-fmt-args.rs:5:13
-   |
-LL |     let x = format_args!("a {} {} {}.", 1, format_args!("b{}!", 2), 3);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
-   |             |
-   |             creates a temporary value which is freed while still in use
-...
-LL |     bar(x);
-   |         - borrow later used here
-   |
-   = note: the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used
-   = note: to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>
-
-error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-114374-invalid-help-fmt-args.rs:10:15
-   |
-LL |     let foo = format_args!("{}", "hi");
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
-   |               |
-   |               creates a temporary value which is freed while still in use
-LL |
-LL |     bar(foo);
-   |         --- borrow later used here
-   |
-   = note: the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used
-   = note: to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0716`.