Skip to content
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

rustdoc: Fix handling of compile errors when running `rustdoc --test` #68357

Merged
merged 1 commit into from Jan 20, 2020

Conversation

@ollie27
Copy link
Contributor

ollie27 commented Jan 18, 2020

  • Call abort_if_errors so all errors actually stop rustdoc.
  • Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message.
  • Use rlib as the crate type when searching for doctests matching what is used for doc generation so #[no_std] crates don't create "no global memory allocator" errors.

Fixes #52243
Fixes #54010

r? @GuillaumeGomez

 * Call `abort_if_errors` so all errors actually stop rustdoc.
* Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message.
* Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors.
@ollie27

This comment has been minimized.

Copy link
Contributor Author

ollie27 commented Jan 19, 2020

This is applying the fixes suggested in #52243 (comment) so credit to @SimonSapin.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Jan 19, 2020

Thanks!

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 19, 2020

📌 Commit 17f4cbc has been approved by GuillaumeGomez

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jan 20, 2020
…laumeGomez

rustdoc: Fix handling of compile errors when running `rustdoc --test`

 * Call `abort_if_errors` so all errors actually stop rustdoc.
* Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message.
* Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors.

Fixes rust-lang#52243
Fixes rust-lang#54010

r? @GuillaumeGomez
bors added a commit that referenced this pull request Jan 20, 2020
Rollup of 5 pull requests

Successful merges:

 - #68326 (rustdoc: Catch fatal errors when syntax highlighting)
 - #68335 (Remove real_drop_in_place)
 - #68353 (Remove `rustc_error_codes` deps except in `rustc_driver`)
 - #68357 (rustdoc: Fix handling of compile errors when running `rustdoc --test`)
 - #68365 (Clean up error codes)

Failed merges:

r? @ghost
@bors bors merged commit 17f4cbc into rust-lang:master Jan 20, 2020
4 checks passed
4 checks passed
pr Build #20200118.62 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@ollie27 ollie27 deleted the ollie27:rustdoc_test_errors branch Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.