Skip to content

Commit 6f931da

Browse files
committed
Remove impl Clean for {Ident, Symbol}
These were only used once, in a place where it was trivial to replace. Also, it's unclear what 'clean' would mean for these, so it seems better to be explicit.
1 parent 5249414 commit 6f931da

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Diff for: src/librustdoc/clean/inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ fn build_macro(cx: &mut DocContext<'_>, did: DefId, name: Symbol) -> clean::Item
552552

553553
let source = format!(
554554
"macro_rules! {} {{\n{}}}",
555-
name.clean(cx),
555+
name,
556556
utils::render_macro_arms(matchers, ";")
557557
);
558558

Diff for: src/librustdoc/clean/mod.rs

-14
Original file line numberDiff line numberDiff line change
@@ -1814,20 +1814,6 @@ impl Clean<PathSegment> for hir::PathSegment<'_> {
18141814
}
18151815
}
18161816

1817-
impl Clean<String> for Ident {
1818-
#[inline]
1819-
fn clean(&self, cx: &mut DocContext<'_>) -> String {
1820-
self.name.clean(cx)
1821-
}
1822-
}
1823-
1824-
impl Clean<String> for Symbol {
1825-
#[inline]
1826-
fn clean(&self, _: &mut DocContext<'_>) -> String {
1827-
self.to_string()
1828-
}
1829-
}
1830-
18311817
impl Clean<BareFunctionDecl> for hir::BareFnTy<'_> {
18321818
fn clean(&self, cx: &mut DocContext<'_>) -> BareFunctionDecl {
18331819
let (generic_params, decl) = enter_impl_trait(cx, |cx| {

0 commit comments

Comments
 (0)