Skip to content

Commit bd4dca9

Browse files
committed
Remove redundant qualification in path hir::HirId
1 parent f2ff9f9 commit bd4dca9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/rustc_mir_transform/src/check_unsafety.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct UnsafetyChecker<'a, 'tcx> {
2828
///
2929
/// The keys are the used `unsafe` blocks, the boolean flag indicates whether
3030
/// 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>,
3232
}
3333

3434
impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
@@ -263,7 +263,7 @@ impl<'tcx> UnsafetyChecker<'_, 'tcx> {
263263
fn register_violations<'a>(
264264
&mut self,
265265
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)>,
267267
) {
268268
let safety = self.body.source_scopes[self.source_info.scope]
269269
.local_data
@@ -403,9 +403,9 @@ enum Context {
403403

404404
struct UnusedUnsafeVisitor<'a, 'tcx> {
405405
tcx: TyCtxt<'tcx>,
406-
used_unsafe_blocks: &'a FxHashMap<hir::HirId, bool>,
406+
used_unsafe_blocks: &'a FxHashMap<HirId, bool>,
407407
context: Context,
408-
unused_unsafe: &'a mut Vec<(hir::HirId, UnusedUnsafe)>,
408+
unused_unsafe: &'a mut Vec<(HirId, UnusedUnsafe)>,
409409
}
410410

411411
impl<'tcx> intravisit::Visitor<'tcx> for UnusedUnsafeVisitor<'_, 'tcx> {
@@ -444,7 +444,7 @@ impl<'tcx> intravisit::Visitor<'tcx> for UnusedUnsafeVisitor<'_, 'tcx> {
444444
fn check_unused_unsafe(
445445
tcx: TyCtxt<'_>,
446446
def_id: LocalDefId,
447-
used_unsafe_blocks: &FxHashMap<hir::HirId, bool>,
447+
used_unsafe_blocks: &FxHashMap<HirId, bool>,
448448
) -> Vec<(HirId, UnusedUnsafe)> {
449449
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
450450
let body_id = tcx.hir().maybe_body_owned_by(hir_id);
@@ -506,7 +506,7 @@ fn unsafety_check_result<'tcx>(
506506
})
507507
}
508508

509-
fn report_unused_unsafe(tcx: TyCtxt<'_>, kind: UnusedUnsafe, id: hir::HirId) {
509+
fn report_unused_unsafe(tcx: TyCtxt<'_>, kind: UnusedUnsafe, id: HirId) {
510510
let span = tcx.sess.source_map().guess_head_span(tcx.hir().span(id));
511511
tcx.struct_span_lint_hir(UNUSED_UNSAFE, id, span, |lint| {
512512
let msg = "unnecessary `unsafe` block";

0 commit comments

Comments
 (0)