-
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
ICE with rustc --version | false
#14505
Comments
Closing as a dupe of #13824 |
reopening; #13824 did not address the fact that this ICE's. |
Hmm, I thought if let Err(e) = result {
panic!("failed printing to stdout: {}", e);
} Note that the docs on |
println!() still panics on broken pipe ( |
This is a little more annoying than just println! too.
See, I tried to catch the write failure and I couldn't because the panic happened deeper than the code could reach. Same thing happens with io::stdout().write(). Both of which look to be lower level than println!. This makes piping ANY rust program a recipe for failure at some point. If there is a work around please document it. |
@shaleh: I'm not sure I follow this one? It does |
Did you try it? I have a BrokenPipe handler but the thread is still killed. Yes the break happens but then the program still dies.
I can panic! myself but I cannot ignore the panic. |
Here's my code: gist
[edit: tested on Mac and Linux, didn't try on Windows] |
Grumble. My version of the code was in a function called by main. There was a debug print still hiding in main so I caught the pipe in my function and then another one was triggered by the debug print in main. Well, at least we have a solution to the SIGPIPE to add to the documentation. That will save others the pain. |
This has now been fixed! I don't know how, exactly, but glacier alerted me a few days ago. |
fix: Fix block local impl trait solving regressions Fixes rust-lang/rust-analyzer#14443
Attempting to run
rustc --version
with a closed stdout will ICE:The text was updated successfully, but these errors were encountered: