@@ -12,7 +12,7 @@ use rustc::lint::builtin::{SAFE_EXTERN_STATICS, SAFE_PACKED_BORROWS, UNUSED_UNSA
12
12
use rustc:: mir:: * ;
13
13
use rustc:: mir:: visit:: { PlaceContext , Visitor , MutatingUseContext } ;
14
14
15
- use syntax:: symbol:: { InternedString , sym} ;
15
+ use syntax:: symbol:: { Symbol , sym} ;
16
16
17
17
use std:: ops:: Bound ;
18
18
@@ -167,9 +167,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
167
167
( CastTy :: FnPtr , CastTy :: Int ( _) ) => {
168
168
self . register_violations ( & [ UnsafetyViolation {
169
169
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" ) ,
173
172
kind : UnsafetyViolationKind :: General ,
174
173
} ] , & [ ] ) ;
175
174
} ,
@@ -185,8 +184,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
185
184
if let ty:: RawPtr ( _) | ty:: FnPtr ( ..) = lhs. ty ( self . body , self . tcx ) . kind {
186
185
self . register_violations ( & [ UnsafetyViolation {
187
186
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" ) ,
190
189
kind : UnsafetyViolationKind :: General ,
191
190
} ] , & [ ] ) ;
192
191
}
@@ -219,8 +218,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
219
218
self . source_scope_local_data [ source_info. scope ] . lint_root ;
220
219
self . register_violations ( & [ UnsafetyViolation {
221
220
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 (
224
223
"extern statics are not controlled by the Rust type system: \
225
224
invalid data, aliasing violations or data races will cause \
226
225
undefined behavior") ,
@@ -240,8 +239,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
240
239
self . source_scope_local_data [ source_info. scope ] . lint_root ;
241
240
self . register_violations ( & [ UnsafetyViolation {
242
241
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 (
245
244
"fields of packed structs might be misaligned: dereferencing a \
246
245
misaligned pointer or even just creating a misaligned reference \
247
246
is undefined behavior") ,
@@ -334,8 +333,8 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
334
333
let source_info = self . source_info ;
335
334
self . register_violations ( & [ UnsafetyViolation {
336
335
source_info,
337
- description : InternedString :: intern ( description) ,
338
- details : InternedString :: intern ( details) ,
336
+ description : Symbol :: intern ( description) ,
337
+ details : Symbol :: intern ( details) ,
339
338
kind,
340
339
} ] , & [ ] ) ;
341
340
}
@@ -438,8 +437,8 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
438
437
let source_info = self . source_info ;
439
438
self . register_violations ( & [ UnsafetyViolation {
440
439
source_info,
441
- description : InternedString :: intern ( description) ,
442
- details : InternedString :: intern ( details) ,
440
+ description : Symbol :: intern ( description) ,
441
+ details : Symbol :: intern ( details) ,
443
442
kind : UnsafetyViolationKind :: GeneralAndConstFn ,
444
443
} ] , & [ ] ) ;
445
444
}
0 commit comments