Commit fc4ca55
committed
Add
- Add `Item::from_hir_id_and_kind` convenience wrapper
- Make name parameter mandatory
`tcx.opt_item_name` doesn't handle renames, so this is necessary
for any item that could be renamed, which is almost all of them.
- Override visibilities to be `Inherited` for enum variants
`tcx.visibility` returns the effective visibility, not the visibility
that was written in the source code. `pub enum E { A, B }` always has
public variants `A` and `B`, so there's no sense printing `pub` again.
- Don't duplicate handling of `Visibility::Crate`
Instead, represent it as just another `Restricted` path.from_def_id_and_kind reducing duplication in rustdoc1 parent c9a17b1 commit fc4ca55
File tree
5 files changed
+193
-260
lines changed- src
- librustdoc
- clean
- html
- test/rustdoc
5 files changed
+193
-260
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 127 | + | |
| 128 | + | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
| |||
443 | 435 | | |
444 | 436 | | |
445 | 437 | | |
446 | | - | |
447 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
448 | 442 | | |
449 | 443 | | |
450 | 444 | | |
| |||
455 | 449 | | |
456 | 450 | | |
457 | 451 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 452 | + | |
| 453 | + | |
466 | 454 | | |
467 | 455 | | |
468 | 456 | | |
| |||
0 commit comments