-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: don't try to get a DefId for a Def that doesn't have one #58058
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @rust-lang/rustdoc |
Thanks! @bors: r+ |
📌 Commit c955f17 has been approved by |
⌛ Testing commit c955f17 with merge 900b2b3c375f465044d6538116cfc356dbda1c82... |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
rustdoc: don't try to get a DefId for a Def that doesn't have one Fixes #58054 The compiler allows you to write a `use` statement for a built-in non-macro attribute, since `use proc_macro` can apply to both the `proc_macro` crate and the `#[proc_macro]` attribute. However, if you write a use statement for something that *doesn't* have this crossover, rustdoc will try to use it the same way as anything else... which resulted in an ICE because it tried to pull a DefId for something that didn't have one. This PR makes rustdoc skip those lookups when it encounters them, allowing it to properly process and render these imports.
☀️ Test successful - checks-travis, status-appveyor |
Fixes #58054
The compiler allows you to write a
use
statement for a built-in non-macro attribute, sinceuse proc_macro
can apply to both theproc_macro
crate and the#[proc_macro]
attribute. However, if you write a use statement for something that doesn't have this crossover, rustdoc will try to use it the same way as anything else... which resulted in an ICE because it tried to pull a DefId for something that didn't have one. This PR makes rustdoc skip those lookups when it encounters them, allowing it to properly process and render these imports.