@@ -17,11 +17,11 @@ use rustc::lint::LateContext;
17
17
use rustc:: ty:: subst:: { Subst , Substs } ;
18
18
use rustc:: ty:: { self , Instance , Ty , TyCtxt } ;
19
19
use rustc:: { bug, span_bug} ;
20
+ use rustc_data_structures:: sync:: Lrc ;
20
21
use std:: cmp:: Ordering :: { self , Equal } ;
21
22
use std:: cmp:: PartialOrd ;
22
23
use std:: convert:: TryInto ;
23
24
use std:: hash:: { Hash , Hasher } ;
24
- use std:: rc:: Rc ;
25
25
use syntax:: ast:: { FloatTy , LitKind } ;
26
26
use syntax:: ptr:: P ;
27
27
@@ -31,7 +31,7 @@ pub enum Constant {
31
31
/// a String "abc"
32
32
Str ( String ) ,
33
33
/// a Binary String b"abc"
34
- Binary ( Rc < Vec < u8 > > ) ,
34
+ Binary ( Lrc < Vec < u8 > > ) ,
35
35
/// a single char 'a'
36
36
Char ( char ) ,
37
37
/// an integer's bit representation
@@ -156,7 +156,7 @@ pub fn lit_to_constant<'tcx>(lit: &LitKind, ty: Ty<'tcx>) -> Constant {
156
156
match * lit {
157
157
LitKind :: Str ( ref is, _) => Constant :: Str ( is. to_string ( ) ) ,
158
158
LitKind :: Byte ( b) => Constant :: Int ( u128:: from ( b) ) ,
159
- LitKind :: ByteStr ( ref s) => Constant :: Binary ( Rc :: clone ( s) ) ,
159
+ LitKind :: ByteStr ( ref s) => Constant :: Binary ( Lrc :: clone ( s) ) ,
160
160
LitKind :: Char ( c) => Constant :: Char ( c) ,
161
161
LitKind :: Int ( n, _) => Constant :: Int ( n) ,
162
162
LitKind :: Float ( ref is, _) | LitKind :: FloatUnsuffixed ( ref is) => match ty. sty {
0 commit comments