-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
defrost RUST_MIN_STACK=ice rustc hello.rs
#125302
Conversation
An earlier commit included the change for a suggestion here. Unfortunately, it also used unwrap instead of dying properly. Roll out the ~~rice paper~~ EarlyDiagCtxt before we do anything that might leave a mess.
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
Thanks @danielhenrymantilla! |
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.
Do you mind tweaking the message a bit? Left a comment below.
compiler/rustc_interface/src/util.rs
Outdated
.map(|s| { | ||
s.trim().parse::<usize>().unwrap_or_else(|_| { | ||
#[allow(rustc::untranslatable_diagnostic)] | ||
early_dcx.early_fatal("`RUST_MIN_STACK` should be unset or a number of bytes") |
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.
early_dcx.early_fatal("`RUST_MIN_STACK` should be unset or a number of bytes") | |
early_dcx.early_struct_fatal(format!("`RUST_MIN_STACK` be set to a number of bytes, but it was set to `{}`", s.trim())).note("alternatively, unset `RUST_MIN_STACK` if it was not meant to be set").emit() |
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.
an idea (modulo formatting) to make the note more descriptive
don't particularly care if it's done with this exact primary/note, but specifically, i'd like for us to explain to the user what was set for RUST_MIN_STACK
, so it's easier for them to (e.g.) search through a bash file or an env file to see where it's set incorrectly.
569c1de
to
b6d0d6d
Compare
@bors r+ rollup |
r? compiler-errors |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#125034 (Weekly `cargo update`) - rust-lang#125093 (Add `fn into_raw_with_allocator` to Rc/Arc/Weak.) - rust-lang#125282 (Never type unsafe lint improvements) - rust-lang#125301 (fix suggestion in E0373 for !Unpin coroutines) - rust-lang#125302 (defrost `RUST_MIN_STACK=ice rustc hello.rs`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#125302 - workingjubilee:prefer-my-stack-neat, r=compiler-errors defrost `RUST_MIN_STACK=ice rustc hello.rs` I didn't think too hard about testing my previous PR rust-lang#122847 which makes our stack overflow handler assist people in discovering the `RUST_MIN_STACK` variable (which apparently is surprisingly useful for Really Big codebases). After it was merged, some useful comments left in a drive-by review led me to discover I had added an ICE. This reworks the code a bit to explain the rationale, remove the ICE that I introduced, and properly test one of the diagnostics.
Then at the very least let's get this to beta as well |
Beta is currently 1.80, so this is in the beta. |
Ah sweet! |
To quote myself over here: #126431 (comment)
|
Clearing stable backport labels since we didn't ship a 1.79 point release, and this is already in current stable 1.80.0. @rustbot label -stable-nominated -stable-accepted |
I didn't think too hard about testing my previous PR #122847 which makes our stack overflow handler assist people in discovering the
RUST_MIN_STACK
variable (which apparently is surprisingly useful for Really Big codebases). After it was merged, some useful comments left in a drive-by review led me to discover I had added an ICE. This reworks the code a bit to explain the rationale, remove the ICE that I introduced, and properly test one of the diagnostics.