Skip to content

Commit 952deae

Browse files
authored
Rollup merge of #86886 - jyn514:no-clean-symbol, r=GuillaumeGomez
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. Found while reviewing #86841, which makes the same change to `build_macro`, so the two will conflict. r? `@GuillaumeGomez`
2 parents 973f208 + 6f931da commit 952deae

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

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

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)