-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rustdoc crashes on broken code #33678
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
Comments
This is happening because of this line and the subsequent unwrap. It seems intentional? |
Ah, it's a result of https://github.com/rust-lang/rust/pull/31507/files. We should make it abort or propagate errors instead |
To fix this bug, we should replace the Please let me know if you want to work on this! |
I use |
@Manishearth Would love to assist with this low-hanging fruit; pls see my local branch. I'm very new to Rust, and in the change I retained similar wording to line 151. Here is the output from a local build using the above crash.rs's contents:
Welcome your guidance and comments. |
That's the first step, we should also remove the unwrap and the Option, https://github.com/crimsun/rust/blob/fa55979005c8acbff651037ee3e98325ad7f1552/src/librustdoc/core.rs#L209 should no longer use Some and the unwrap after that can be removed. I prefer "Compilation failed, aborting rustdoc", since the mental model is not that rustdoc itself compiles things. |
Thank you! I've updated the branch based on your comments with nearly identical output:
|
Looks good, squash the commits and make a pull request! |
…pping. Removed Option use and comment to match.
Resolved rustdoc crash (#33678) by aborting instead of unwrapping. Also removed Option use and comment to match. Fixes rust-lang/rust#33678
Uh oh!
There was an error while loading. Please reload this page.
(If you want to work on this, see this comment)
gives
The text was updated successfully, but these errors were encountered: