about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-22 11:21:37 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-11-02 09:01:02 +1100
commitd0db29003975d8c4b3a552ff8c3a68435173cdc7 (patch)
tree5aac5544ad55780f5afbbe1538e49cd1efb91854 /src/libsyntax_pos
parentb9cef6984b606705f42adf9587f4f1c3babf4d4d (diff)
downloadrust-d0db29003975d8c4b3a552ff8c3a68435173cdc7.tar.gz
rust-d0db29003975d8c4b3a552ff8c3a68435173cdc7.zip
Remove the `AsRef` impl for `SymbolStr`.
Because it's highly magical, which goes against the goal of keeping
`SymbolStr` simple. Plus it's only used in a handful of places that
only require minor changes.
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/symbol.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 4ff558a22e1..3f7b3e5b3d8 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -1099,16 +1099,6 @@ pub struct SymbolStr {
     string: &'static str,
 }
 
-impl<U: ?Sized> std::convert::AsRef<U> for SymbolStr
-where
-    str: std::convert::AsRef<U>
-{
-    #[inline]
-    fn as_ref(&self) -> &U {
-        self.string.as_ref()
-    }
-}
-
 // This impl allows a `SymbolStr` to be directly equated with a `String` or
 // `&str`.
 impl<T: std::ops::Deref<Target = str>> std::cmp::PartialEq<T> for SymbolStr {