diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-11-15 14:09:26 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-11-17 15:16:03 -0500 |
| commit | fc4ca552916d4f6b0952f9352a1cc7e1f68d6248 (patch) | |
| tree | b64dbe7cab7e656bb761267463e8975279003796 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | c9a17b1d3f27690da2991db76866a3edb0f6d6ac (diff) | |
| download | rust-fc4ca552916d4f6b0952f9352a1cc7e1f68d6248.tar.gz rust-fc4ca552916d4f6b0952f9352a1cc7e1f68d6248.zip | |
Add `from_def_id_and_kind` reducing duplication in rustdoc
- 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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
