diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-07-05 11:18:13 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-07-05 11:23:05 -0400 |
| commit | 6f931da0f6abba92f4177e11407025e2b088da65 (patch) | |
| tree | 14233879f052c32bdf0eca11aae6929efd921582 | |
| parent | 5249414809d40fe22eca0c36105a2f71b9006e04 (diff) | |
| download | rust-6f931da0f6abba92f4177e11407025e2b088da65.tar.gz rust-6f931da0f6abba92f4177e11407025e2b088da65.zip | |
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.
| -rw-r--r-- | src/librustdoc/clean/inline.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 7b1b23ff8e6..1edb855a5d6 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -552,7 +552,7 @@ fn build_macro(cx: &mut DocContext<'_>, did: DefId, name: Symbol) -> clean::Item let source = format!( "macro_rules! {} {{\n{}}}", - name.clean(cx), + name, utils::render_macro_arms(matchers, ";") ); diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index b0e75493aa4..cc086427dd0 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1814,20 +1814,6 @@ impl Clean<PathSegment> for hir::PathSegment<'_> { } } -impl Clean<String> for Ident { - #[inline] - fn clean(&self, cx: &mut DocContext<'_>) -> String { - self.name.clean(cx) - } -} - -impl Clean<String> for Symbol { - #[inline] - fn clean(&self, _: &mut DocContext<'_>) -> String { - self.to_string() - } -} - impl Clean<BareFunctionDecl> for hir::BareFnTy<'_> { fn clean(&self, cx: &mut DocContext<'_>) -> BareFunctionDecl { let (generic_params, decl) = enter_impl_trait(cx, |cx| { |
