Commit 0e5a209
committed
Auto merge of rust-lang#58058 - QuietMisdreavus:use-attr, r=GuillaumeGomez
rustdoc: don't try to get a DefId for a Def that doesn't have one
Fixes rust-lang#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.File tree
4 files changed
+18
-6
lines changed- src
- librustdoc
- clean
- test/rustdoc
4 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3835 | 3835 | | |
3836 | 3836 | | |
3837 | 3837 | | |
3838 | | - | |
| 3838 | + | |
3839 | 3839 | | |
3840 | 3840 | | |
3841 | 3841 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
288 | 290 | | |
289 | | - | |
290 | | - | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments