@@ -28,7 +28,7 @@ pub struct UnsafetyChecker<'a, 'tcx> {
28
28
///
29
29
/// The keys are the used `unsafe` blocks, the boolean flag indicates whether
30
30
/// or not any of the usages happen at a place that doesn't allow `unsafe_op_in_unsafe_fn`.
31
- used_unsafe_blocks : FxHashMap < hir :: HirId , bool > ,
31
+ used_unsafe_blocks : FxHashMap < HirId , bool > ,
32
32
}
33
33
34
34
impl < ' a , ' tcx > UnsafetyChecker < ' a , ' tcx > {
@@ -263,7 +263,7 @@ impl<'tcx> UnsafetyChecker<'_, 'tcx> {
263
263
fn register_violations < ' a > (
264
264
& mut self ,
265
265
violations : impl ExactSizeIterator < Item = & ' a UnsafetyViolation > ,
266
- new_used_unsafe_blocks : impl Iterator < Item = ( & ' a hir :: HirId , & ' a bool ) > ,
266
+ new_used_unsafe_blocks : impl Iterator < Item = ( & ' a HirId , & ' a bool ) > ,
267
267
) {
268
268
let safety = self . body . source_scopes [ self . source_info . scope ]
269
269
. local_data
@@ -403,9 +403,9 @@ enum Context {
403
403
404
404
struct UnusedUnsafeVisitor < ' a , ' tcx > {
405
405
tcx : TyCtxt < ' tcx > ,
406
- used_unsafe_blocks : & ' a FxHashMap < hir :: HirId , bool > ,
406
+ used_unsafe_blocks : & ' a FxHashMap < HirId , bool > ,
407
407
context : Context ,
408
- unused_unsafe : & ' a mut Vec < ( hir :: HirId , UnusedUnsafe ) > ,
408
+ unused_unsafe : & ' a mut Vec < ( HirId , UnusedUnsafe ) > ,
409
409
}
410
410
411
411
impl < ' tcx > intravisit:: Visitor < ' tcx > for UnusedUnsafeVisitor < ' _ , ' tcx > {
@@ -444,7 +444,7 @@ impl<'tcx> intravisit::Visitor<'tcx> for UnusedUnsafeVisitor<'_, 'tcx> {
444
444
fn check_unused_unsafe (
445
445
tcx : TyCtxt < ' _ > ,
446
446
def_id : LocalDefId ,
447
- used_unsafe_blocks : & FxHashMap < hir :: HirId , bool > ,
447
+ used_unsafe_blocks : & FxHashMap < HirId , bool > ,
448
448
) -> Vec < ( HirId , UnusedUnsafe ) > {
449
449
let hir_id = tcx. hir ( ) . local_def_id_to_hir_id ( def_id) ;
450
450
let body_id = tcx. hir ( ) . maybe_body_owned_by ( hir_id) ;
@@ -506,7 +506,7 @@ fn unsafety_check_result<'tcx>(
506
506
} )
507
507
}
508
508
509
- fn report_unused_unsafe ( tcx : TyCtxt < ' _ > , kind : UnusedUnsafe , id : hir :: HirId ) {
509
+ fn report_unused_unsafe ( tcx : TyCtxt < ' _ > , kind : UnusedUnsafe , id : HirId ) {
510
510
let span = tcx. sess . source_map ( ) . guess_head_span ( tcx. hir ( ) . span ( id) ) ;
511
511
tcx. struct_span_lint_hir ( UNUSED_UNSAFE , id, span, |lint| {
512
512
let msg = "unnecessary `unsafe` block" ;
0 commit comments