Skip to content

Commit 7a1bc79

Browse files
committed
Remove LocalInternedString::intern.
1 parent a1cd79f commit 7a1bc79

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/libsyntax_pos/symbol.rs

-13
Original file line numberDiff line numberDiff line change
@@ -1157,19 +1157,6 @@ pub struct LocalInternedString {
11571157
string: &'static str,
11581158
}
11591159

1160-
impl LocalInternedString {
1161-
/// Maps a string to its interned representation.
1162-
pub fn intern(string: &str) -> Self {
1163-
let string = with_interner(|interner| {
1164-
let symbol = interner.intern(string);
1165-
interner.strings[symbol.0.as_usize()]
1166-
});
1167-
LocalInternedString {
1168-
string: unsafe { std::mem::transmute::<&str, &str>(string) }
1169-
}
1170-
}
1171-
}
1172-
11731160
impl<U: ?Sized> std::convert::AsRef<U> for LocalInternedString
11741161
where
11751162
str: std::convert::AsRef<U>

0 commit comments

Comments
 (0)