diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-07-06 02:33:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-06 02:33:18 +0900 |
| commit | 952deae6af07cb3d5d19ac00dce4ebe23c88109d (patch) | |
| tree | 9bcbef08ba7fd19a61fc9ad9d3c341da629ca9c1 | |
| parent | 973f208dfc9a8a75b7e4bafb886f49b8809acb9a (diff) | |
| parent | 6f931da0f6abba92f4177e11407025e2b088da65 (diff) | |
| download | rust-952deae6af07cb3d5d19ac00dce4ebe23c88109d.tar.gz rust-952deae6af07cb3d5d19ac00dce4ebe23c88109d.zip | |
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 https://github.com/rust-lang/rust/pull/86841, which makes the same change to `build_macro`, so the two will conflict.
r? `@GuillaumeGomez`
| -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| { |
