]>
git.proxmox.com Git - rustc.git/blob - src/librustdoc/passes/strip_priv_imports.rs
1 //! Strips all private import statements (use, extern crate) from a
4 use crate::core
::DocContext
;
5 use crate::fold
::DocFolder
;
6 use crate::passes
::{ImportStripper, Pass}
;
8 pub(crate) const STRIP_PRIV_IMPORTS
: Pass
= Pass
{
9 name
: "strip-priv-imports",
10 run
: strip_priv_imports
,
11 description
: "strips all private import statements (`use`, `extern crate`) from a crate",
14 pub(crate) fn strip_priv_imports(krate
: clean
::Crate
, _
: &mut DocContext
<'_
>) -> clean
::Crate
{
15 ImportStripper
.fold_crate(krate
)