-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
cargo +nightly doc
panics for crates depending on gfx-backend-empty
#70874
Comments
cc @rust-lang/rustdoc |
245: Check `cargo doc` in CI r=kvark a=hecrj This PR makes CI run `cargo doc` using the latest nightly. It is currently panicking here: https://github.com/rust-lang/rust/blob/6dee5f1126dfd5c9314ee5ae9d9eb010e35ef257/src/librustdoc/passes/mod.rs#L411 I thought it was an incorrect link causing it, but the issue seems to persist even after fixing the link. __Update__: Issue opened upstream by @grovesNL (rust-lang/rust#70874). Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
245: Check `cargo doc` in CI r=kvark a=hecrj This PR makes CI run `cargo doc` using the latest nightly. It is currently panicking here: https://github.com/rust-lang/rust/blob/6dee5f1126dfd5c9314ee5ae9d9eb010e35ef257/src/librustdoc/passes/mod.rs#L411 I thought it was an incorrect link causing it, but the issue seems to persist even after fixing the link. __Update__: Issue opened upstream by @grovesNL (rust-lang/rust#70874). Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
Oh that's bad. We should make a warning about empty code blocks though. I'll send a PR shortly. |
cc @arlosi - we're discussing this on Discord and @GuillaumeGomez has bisected it to #69718. |
It seems that before #69718, the hash would not have matched, so the external source would be "not present". After #69718, the external source would be present, but not-normalized. Which I suspect would cause any offsets into it to be incorrect. I'm not exactly sure how it worked before (given that it would have absent external source). |
Normalize source when loading external foreign source into SourceMap The compiler normalizes source when reading files initially (removes BOMs, etc), but not when loading external sources. This leads to the external source matching according to the `src_hash`, but differing internally because it was not normalized. Fixes rust-lang#70874.
245: Check `cargo doc` in CI r=kvark a=hecrj This PR makes CI run `cargo doc` using the latest nightly. It is currently panicking here: https://github.com/rust-lang/rust/blob/6dee5f1126dfd5c9314ee5ae9d9eb010e35ef257/src/librustdoc/passes/mod.rs#L411 I thought it was an incorrect link causing it, but the issue seems to persist even after fixing the link. __Update__: Issue opened upstream by @grovesNL (rust-lang/rust#70874). Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
If I create a new crate with
Then add a dependency on gfx-backend-empty version 0.5:
Then run
cargo doc
on stable:cargo doc
succeeds with warnings. I'm not sure if the warnings are relevant, but the warnings incargo +stable doc
are for some empty blocks in examples that haven't been populated, such as:Now if I run the same command on nightly (
nightly-2020-04-06
):cargo doc
panics with the following error:The panic originates in
rust/src/librustdoc/passes/mod.rs
Line 411 in 1ccb0b4
Besides
stable
andnightly
, I tried thenightly-2020-03-19
toolchain which succeeds with warnings (likestable
).I also created a repo which reproduces the issue at https://github.com/grovesNL/rustdocissue if it's convenient to clone that instead of following the steps above.
The text was updated successfully, but these errors were encountered: