-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make [e]println macros eagerly drop temporaries (for backport) #96490
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
Untagging S-waiting-on-fcp. This is effectively a revert of a small part of #94868. I believe this can safely go in master and beta without waiting on the FCP to expire, to resolve the regression currently affecting beta and make upcoming beta crater runs more useful. If the FCP were to fail (seems unlikely right now from the other thread), we can easily redo the change that this is reverting. |
@bors r+ p=1 |
📌 Commit 3a8f81a has been approved by |
Unilaterally beta-accepting -- seems like a small patch with clear revert results. |
⌛ Testing commit 3a8f81a with merge 0fea468750757c429009469d37343e98bfa68eea... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
This reverts commit ac5c657.
@bors r=Mark-Simulacrum |
📌 Commit e2d4c7b has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (61469b6): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
…lacrum Make [e]println macros eagerly drop temporaries (for backport) This PR extracts the subset of rust-lang#96455 which is only the parts necessary for fixing the 1.61-beta regressions in rust-lang#96434. My larger PR rust-lang#96455 contains a few other changes relative to the pre-rust-lang#94868 behavior; those are not necessary to backport into 1.61. argument position | before rust-lang#94868 | after rust-lang#94868 | after this PR --- |:---:|:---:|:---: `write!($tmp, "…", …)` | :rage: | :rage: | :rage: `write!(…, "…", $tmp)` | :rage: | :rage: | :rage: `writeln!($tmp, "…", …)` | :rage: | :rage: | :rage: `writeln!(…, "…", $tmp)` | :rage: | :rage: | :rage: `print!("…", $tmp)` | :rage: | :rage: | :rage: `println!("…", $tmp)` | :smiley_cat: | :rage: | :smiley_cat: `eprint!("…", $tmp)` | :rage: | :rage: | :rage: `eprintln!("…", $tmp)` | :smiley_cat: | :rage: | :smiley_cat: `panic!("…", $tmp)` | :smiley_cat: | :smiley_cat: | :smiley_cat:
[beta] Beta backports * Revert diagnostic duplication and accidental stabilization rust-lang#96516 * Revert "Re-export core::ffi types from std::ffi" rust-lang#96492 * Make [e]println macros eagerly drop temporaries (for backport) rust-lang#96490 * Revert "impl From<&[T; N]> and From<&mut [T; N]> for Vec<T>" rust-lang#96489 * Cargo: * move workspace inheritance unstable docs to the correct place (rust-lang/cargo#10616)
($($arg:tt)*) => { | ||
$crate::io::_print($crate::format_args_nl!($($arg)*)) | ||
}; | ||
($($arg:tt)*) => {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the back and forth here, it might be worth adding a comment that explains why a double brace is used?
…lacrum Make [e]println macros eagerly drop temporaries (for backport) This PR extracts the subset of rust-lang#96455 which is only the parts necessary for fixing the 1.61-beta regressions in rust-lang#96434. My larger PR rust-lang#96455 contains a few other changes relative to the pre-rust-lang#94868 behavior; those are not necessary to backport into 1.61. argument position | before rust-lang#94868 | after rust-lang#94868 | after this PR --- |:---:|:---:|:---: `write!($tmp, "…", …)` | :rage: | :rage: | :rage: `write!(…, "…", $tmp)` | :rage: | :rage: | :rage: `writeln!($tmp, "…", …)` | :rage: | :rage: | :rage: `writeln!(…, "…", $tmp)` | :rage: | :rage: | :rage: `print!("…", $tmp)` | :rage: | :rage: | :rage: `println!("…", $tmp)` | :smiley_cat: | :rage: | :smiley_cat: `eprint!("…", $tmp)` | :rage: | :rage: | :rage: `eprintln!("…", $tmp)` | :smiley_cat: | :rage: | :smiley_cat: `panic!("…", $tmp)` | :smiley_cat: | :smiley_cat: | :smiley_cat:
This PR extracts the subset of #96455 which is only the parts necessary for fixing the 1.61-beta regressions in #96434.
My larger PR #96455 contains a few other changes relative to the pre-#94868 behavior; those are not necessary to backport into 1.61.
write!($tmp, "…", …)
write!(…, "…", $tmp)
writeln!($tmp, "…", …)
writeln!(…, "…", $tmp)
print!("…", $tmp)
println!("…", $tmp)
eprint!("…", $tmp)
eprintln!("…", $tmp)
panic!("…", $tmp)