rustdoc: Prune unexported impls
This commit is contained in:
parent
7d6cf37a8d
commit
c218b65fd8
2 changed files with 10 additions and 1 deletions
|
@ -184,7 +184,7 @@ impl util for itemtag {
|
||||||
doc::enumtag({name, _}) { name }
|
doc::enumtag({name, _}) { name }
|
||||||
doc::restag({name, _}) { name }
|
doc::restag({name, _}) { name }
|
||||||
doc::ifacetag({name, _}) { name }
|
doc::ifacetag({name, _}) { name }
|
||||||
_ { fail }
|
doc::impltag({name, _}) { name }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,3 +248,12 @@ fn should_prune_unexported_ifaces_from_top_mod() {
|
||||||
let doc = run(srv, doc);
|
let doc = run(srv, doc);
|
||||||
assert vec::is_empty(doc.topmod.ifaces());
|
assert vec::is_empty(doc.topmod.ifaces());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn should_prune_unexported_impls_from_top_mod() {
|
||||||
|
let source = "export a; mod a { } impl b for int { fn c() { } }";
|
||||||
|
let srv = astsrv::mk_srv_from_str(source);
|
||||||
|
let doc = extract::from_srv(srv, "");
|
||||||
|
let doc = run(srv, doc);
|
||||||
|
assert vec::is_empty(doc.topmod.impls())
|
||||||
|
}
|
Loading…
Reference in a new issue