We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3573aa commit 966e6c0Copy full SHA for 966e6c0
src/libsyntax/parse/token.rs
@@ -627,11 +627,19 @@ impl InternedString {
627
}
628
629
#[inline]
630
+ #[deprecated = "use as_slice() instead"]
631
pub fn get<'a>(&'a self) -> &'a str {
632
&self.string[]
633
634
635
636
+impl Str for InternedString {
637
+ #[inline]
638
+ fn as_slice<'a>(&'a self) -> &'a str {
639
+ &self.string[]
640
+ }
641
+}
642
+
643
impl Deref for InternedString {
644
type Target = str;
645
0 commit comments