diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-07-27 14:58:42 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-07-29 14:39:10 +0200 |
| commit | 31bb3c0cd191b9173f254ebe7371eda638af6a6c (patch) | |
| tree | a5662e2fea00604713347b251774929bd343f822 /src/librustdoc/clean | |
| parent | f45961b60dba72a6d0be4c29872941982cc26c2e (diff) | |
| download | rust-31bb3c0cd191b9173f254ebe7371eda638af6a6c.tar.gz rust-31bb3c0cd191b9173f254ebe7371eda638af6a6c.zip | |
Move Res check into `should_ignore_res`
Diffstat (limited to 'src/librustdoc/clean')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 9839b82d7d7..4fe7c0b7a00 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -41,7 +41,7 @@ use thin_vec::ThinVec; use crate::core::{self, DocContext, ImplTraitParam}; use crate::formats::item_type::ItemType; -use crate::visit_ast::Module as DocModule; +use crate::visit_ast::{should_ignore_res, Module as DocModule}; use utils::*; @@ -2809,7 +2809,7 @@ fn clean_use_statement_inner<'tcx>( cx: &mut DocContext<'tcx>, inlined_names: &mut FxHashSet<(ItemType, Symbol)>, ) -> Vec<Item> { - if let Res::Def(DefKind::Ctor(..), _) | Res::SelfCtor(..) = path.res { + if should_ignore_res(path.res) { return Vec::new(); } // We need this comparison because some imports (for std types for example) |
