@@ -12,7 +12,7 @@ use rustc::lint::builtin::{SAFE_EXTERN_STATICS, SAFE_PACKED_BORROWS, UNUSED_UNSA
1212use rustc:: mir:: * ;
1313use rustc:: mir:: visit:: { PlaceContext , Visitor , MutatingUseContext } ;
1414
15- use syntax:: symbol:: { InternedString , sym} ;
15+ use syntax:: symbol:: { Symbol , sym} ;
1616
1717use std:: ops:: Bound ;
1818
@@ -167,9 +167,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
167167 ( CastTy :: FnPtr , CastTy :: Int ( _) ) => {
168168 self . register_violations ( & [ UnsafetyViolation {
169169 source_info : self . source_info ,
170- description : InternedString :: intern ( "cast of pointer to int" ) ,
171- details : InternedString :: intern (
172- "casting pointers to integers in constants" ) ,
170+ description : Symbol :: intern ( "cast of pointer to int" ) ,
171+ details : Symbol :: intern ( "casting pointers to integers in constants" ) ,
173172 kind : UnsafetyViolationKind :: General ,
174173 } ] , & [ ] ) ;
175174 } ,
@@ -185,8 +184,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
185184 if let ty:: RawPtr ( _) | ty:: FnPtr ( ..) = lhs. ty ( self . body , self . tcx ) . kind {
186185 self . register_violations ( & [ UnsafetyViolation {
187186 source_info : self . source_info ,
188- description : InternedString :: intern ( "pointer operation" ) ,
189- details : InternedString :: intern ( "operations on pointers in constants" ) ,
187+ description : Symbol :: intern ( "pointer operation" ) ,
188+ details : Symbol :: intern ( "operations on pointers in constants" ) ,
190189 kind : UnsafetyViolationKind :: General ,
191190 } ] , & [ ] ) ;
192191 }
@@ -219,8 +218,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
219218 self . source_scope_local_data [ source_info. scope ] . lint_root ;
220219 self . register_violations ( & [ UnsafetyViolation {
221220 source_info,
222- description : InternedString :: intern ( "use of extern static" ) ,
223- details : InternedString :: intern (
221+ description : Symbol :: intern ( "use of extern static" ) ,
222+ details : Symbol :: intern (
224223 "extern statics are not controlled by the Rust type system: \
225224 invalid data, aliasing violations or data races will cause \
226225 undefined behavior") ,
@@ -240,8 +239,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
240239 self . source_scope_local_data [ source_info. scope ] . lint_root ;
241240 self . register_violations ( & [ UnsafetyViolation {
242241 source_info,
243- description : InternedString :: intern ( "borrow of packed field" ) ,
244- details : InternedString :: intern (
242+ description : Symbol :: intern ( "borrow of packed field" ) ,
243+ details : Symbol :: intern (
245244 "fields of packed structs might be misaligned: dereferencing a \
246245 misaligned pointer or even just creating a misaligned reference \
247246 is undefined behavior") ,
@@ -334,8 +333,8 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
334333 let source_info = self . source_info ;
335334 self . register_violations ( & [ UnsafetyViolation {
336335 source_info,
337- description : InternedString :: intern ( description) ,
338- details : InternedString :: intern ( details) ,
336+ description : Symbol :: intern ( description) ,
337+ details : Symbol :: intern ( details) ,
339338 kind,
340339 } ] , & [ ] ) ;
341340 }
@@ -438,8 +437,8 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
438437 let source_info = self . source_info ;
439438 self . register_violations ( & [ UnsafetyViolation {
440439 source_info,
441- description : InternedString :: intern ( description) ,
442- details : InternedString :: intern ( details) ,
440+ description : Symbol :: intern ( description) ,
441+ details : Symbol :: intern ( details) ,
443442 kind : UnsafetyViolationKind :: GeneralAndConstFn ,
444443 } ] , & [ ] ) ;
445444 }
0 commit comments