diff options
| author | bors <bors@rust-lang.org> | 2021-03-31 05:47:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-31 05:47:22 +0000 |
| commit | 2a32abbcdea97c6bf1d0445bc657f16c50ca103b (patch) | |
| tree | a0f99946f0ff9e927dcedb078aafd484929aa0ad /compiler/rustc_middle/src | |
| parent | 6ff482bde5d22a3a0171edb3245327f43cf9b593 (diff) | |
| parent | 6f06b761b991f5c4b714c6935781114dce44637a (diff) | |
| download | rust-2a32abbcdea97c6bf1d0445bc657f16c50ca103b.tar.gz rust-2a32abbcdea97c6bf1d0445bc657f16c50ca103b.zip | |
Auto merge of #83681 - jyn514:blanket-impls-tweaks, r=Aaron1011
rustdoc: Only look at blanket impls in `get_blanket_impls` The idea here is that all the work in https://github.com/rust-lang/rust/blob/16156fb2787f745e57504197bd7fe38b69c6cbea/compiler/rustc_middle/src/ty/trait_def.rs#L172-L186 doesn't matter for `get_blanket_impls` - Rustdoc will already pick up on those blocks when it documents the item.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/trait_def.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/trait_def.rs b/compiler/rustc_middle/src/ty/trait_def.rs index ce17a724e25..33065bc3a7b 100644 --- a/compiler/rustc_middle/src/ty/trait_def.rs +++ b/compiler/rustc_middle/src/ty/trait_def.rs @@ -69,6 +69,12 @@ pub struct TraitImpls { non_blanket_impls: FxHashMap<fast_reject::SimplifiedType, Vec<DefId>>, } +impl TraitImpls { + pub fn blanket_impls(&self) -> &[DefId] { + self.blanket_impls.as_slice() + } +} + impl<'tcx> TraitDef { pub fn new( def_id: DefId, |
