about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-02-27 17:11:14 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-03-02 10:48:52 +0100
commitb74e97cf42e647d87d67a03c134a0494b6aaa811 (patch)
treea66e948a4d31dd9681cb6984a3b1fb774bebae4a /src/libsyntax/parse/token.rs
parent878f5b05147480182ea4d8a855acc55bfeb16c22 (diff)
downloadrust-b74e97cf42e647d87d67a03c134a0494b6aaa811.tar.gz
rust-b74e97cf42e647d87d67a03c134a0494b6aaa811.zip
Replace Rc with Lrc for shared data
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 7fbe781e9a1..097a2eb89fd 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -27,7 +27,7 @@ use tokenstream;
 
 use std::cell::Cell;
 use std::{cmp, fmt};
-use std::rc::Rc;
+use rustc_data_structures::sync::Lrc;
 
 #[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
 pub enum BinOpToken {
@@ -180,7 +180,7 @@ pub enum Token {
 
     // The `LazyTokenStream` is a pure function of the `Nonterminal`,
     // and so the `LazyTokenStream` can be ignored by Eq, Hash, etc.
-    Interpolated(Rc<(Nonterminal, LazyTokenStream)>),
+    Interpolated(Lrc<(Nonterminal, LazyTokenStream)>),
     // Can be expanded into several tokens.
     /// Doc comment
     DocComment(ast::Name),
@@ -200,7 +200,7 @@ pub enum Token {
 
 impl Token {
     pub fn interpolated(nt: Nonterminal) -> Token {
-        Token::Interpolated(Rc::new((nt, LazyTokenStream::new())))
+        Token::Interpolated(Lrc::new((nt, LazyTokenStream::new())))
     }
 
     /// Returns `true` if the token starts with '>'.