Skip to content

Commit 367c014

Browse files
committed
rename AddressOf -> RawBorrow inside the compiler
1 parent 9d2f469 commit 367c014

File tree

51 files changed

+92
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+92
-92
lines changed

compiler/rustc_borrowck/src/def_use.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ pub fn categorize(context: PlaceContext) -> Option<DefUse> {
5555
PlaceContext::NonMutatingUse(NonMutatingUseContext::PlaceMention) |
5656
PlaceContext::NonUse(NonUseContext::AscribeUserTy(_)) |
5757

58-
PlaceContext::MutatingUse(MutatingUseContext::AddressOf) |
59-
PlaceContext::NonMutatingUse(NonMutatingUseContext::AddressOf) |
58+
PlaceContext::MutatingUse(MutatingUseContext::RawBorrow) |
59+
PlaceContext::NonMutatingUse(NonMutatingUseContext::RawBorrow) |
6060
PlaceContext::NonMutatingUse(NonMutatingUseContext::Inspect) |
6161
PlaceContext::NonMutatingUse(NonMutatingUseContext::Copy) |
6262
PlaceContext::NonMutatingUse(NonMutatingUseContext::Move) |

compiler/rustc_borrowck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
12421242
);
12431243
}
12441244

1245-
&Rvalue::AddressOf(mutability, place) => {
1245+
&Rvalue::RawPtr(mutability, place) => {
12461246
let access_kind = match mutability {
12471247
Mutability::Mut => (
12481248
Deep,

compiler/rustc_borrowck/src/polonius/loan_invalidations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<'cx, 'tcx> LoanInvalidationsGenerator<'cx, 'tcx> {
269269
self.access_place(location, place, access_kind, LocalMutationIsAllowed::No);
270270
}
271271

272-
&Rvalue::AddressOf(mutability, place) => {
272+
&Rvalue::RawPtr(mutability, place) => {
273273
let access_kind = match mutability {
274274
Mutability::Mut => (
275275
Deep,

compiler/rustc_borrowck/src/type_check/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
756756
PlaceContext::MutatingUse(_) => ty::Invariant,
757757
PlaceContext::NonUse(StorageDead | StorageLive | VarDebugInfo) => ty::Invariant,
758758
PlaceContext::NonMutatingUse(
759-
Inspect | Copy | Move | PlaceMention | SharedBorrow | FakeBorrow | AddressOf
759+
Inspect | Copy | Move | PlaceMention | SharedBorrow | FakeBorrow | RawBorrow
760760
| Projection,
761761
) => ty::Covariant,
762762
PlaceContext::NonUse(AscribeUserTy(variance)) => variance,
@@ -2477,7 +2477,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
24772477
self.check_operand(right, location);
24782478
}
24792479

2480-
Rvalue::AddressOf(..)
2480+
Rvalue::RawPtr(..)
24812481
| Rvalue::ThreadLocalRef(..)
24822482
| Rvalue::Len(..)
24832483
| Rvalue::Discriminant(..)
@@ -2494,7 +2494,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
24942494
| Rvalue::ThreadLocalRef(_)
24952495
| Rvalue::Repeat(..)
24962496
| Rvalue::Ref(..)
2497-
| Rvalue::AddressOf(..)
2497+
| Rvalue::RawPtr(..)
24982498
| Rvalue::Len(..)
24992499
| Rvalue::Cast(..)
25002500
| Rvalue::ShallowInitBox(..)

compiler/rustc_codegen_cranelift/src/analyze.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn analyze(fx: &FunctionCx<'_, '_, '_>) -> IndexVec<Local, SsaKind> {
2525
for stmt in bb.statements.iter() {
2626
match &stmt.kind {
2727
Assign(place_and_rval) => match &place_and_rval.1 {
28-
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
28+
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
2929
flag_map[place.local] = SsaKind::NotSsa;
3030
}
3131
_ => {}

compiler/rustc_codegen_cranelift/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ fn codegen_stmt<'tcx>(
595595
let val = cplace.to_cvalue(fx);
596596
lval.write_cvalue(fx, val)
597597
}
598-
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
598+
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
599599
let place = codegen_place(fx, place);
600600
let ref_ = place.place_ref(fx, lval.layout());
601601
lval.write_cvalue(fx, ref_);

compiler/rustc_codegen_ssa/src/mir/analyze.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
220220
| MutatingUseContext::SetDiscriminant
221221
| MutatingUseContext::AsmOutput
222222
| MutatingUseContext::Borrow
223-
| MutatingUseContext::AddressOf
223+
| MutatingUseContext::RawBorrow
224224
| MutatingUseContext::Projection,
225225
)
226226
| PlaceContext::NonMutatingUse(
227227
NonMutatingUseContext::Inspect
228228
| NonMutatingUseContext::SharedBorrow
229229
| NonMutatingUseContext::FakeBorrow
230-
| NonMutatingUseContext::AddressOf
230+
| NonMutatingUseContext::RawBorrow
231231
| NonMutatingUseContext::Projection,
232232
) => {
233233
self.locals[local] = LocalKind::Memory;

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
582582
mir::Rvalue::CopyForDeref(place) => {
583583
self.codegen_operand(bx, &mir::Operand::Copy(place))
584584
}
585-
mir::Rvalue::AddressOf(mutability, place) => {
585+
mir::Rvalue::RawPtr(mutability, place) => {
586586
let mk_ptr =
587587
move |tcx: TyCtxt<'tcx>, ty: Ty<'tcx>| Ty::new_ptr(tcx, ty, mutability);
588588
self.codegen_place_to_pointer(bx, place, mk_ptr)
@@ -811,7 +811,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
811811
cg_value.len(bx.cx())
812812
}
813813

814-
/// Codegen an `Rvalue::AddressOf` or `Rvalue::Ref`
814+
/// Codegen an `Rvalue::RawPtr` or `Rvalue::Ref`
815815
fn codegen_place_to_pointer(
816816
&mut self,
817817
bx: &mut Bx,
@@ -1083,7 +1083,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
10831083
}
10841084
mir::Rvalue::Ref(..) |
10851085
mir::Rvalue::CopyForDeref(..) |
1086-
mir::Rvalue::AddressOf(..) |
1086+
mir::Rvalue::RawPtr(..) |
10871087
mir::Rvalue::Len(..) |
10881088
mir::Rvalue::Cast(..) | // (*)
10891089
mir::Rvalue::ShallowInitBox(..) | // (*)

compiler/rustc_const_eval/src/check_consts/check.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
430430
return;
431431
}
432432
}
433-
Rvalue::AddressOf(mutbl, place) => {
433+
Rvalue::RawPtr(mutbl, place) => {
434434
if let Some(reborrowed_place_ref) = place_as_reborrow(self.tcx, self.body, place) {
435435
let ctx = match mutbl {
436436
Mutability::Not => {
437-
PlaceContext::NonMutatingUse(NonMutatingUseContext::AddressOf)
437+
PlaceContext::NonMutatingUse(NonMutatingUseContext::RawBorrow)
438438
}
439-
Mutability::Mut => PlaceContext::MutatingUse(MutatingUseContext::AddressOf),
439+
Mutability::Mut => PlaceContext::MutatingUse(MutatingUseContext::RawBorrow),
440440
};
441441
self.visit_local(reborrowed_place_ref.local, ctx, location);
442442
self.visit_projection(reborrowed_place_ref, ctx, location);
@@ -471,7 +471,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
471471
}
472472

473473
Rvalue::Ref(_, BorrowKind::Mut { .. }, place)
474-
| Rvalue::AddressOf(Mutability::Mut, place) => {
474+
| Rvalue::RawPtr(Mutability::Mut, place) => {
475475
// Inside mutable statics, we allow arbitrary mutable references.
476476
// We've allowed `static mut FOO = &mut [elements];` for a long time (the exact
477477
// reasons why are lost to history), and there is no reason to restrict that to
@@ -492,7 +492,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
492492
}
493493

494494
Rvalue::Ref(_, BorrowKind::Shared | BorrowKind::Fake(_), place)
495-
| Rvalue::AddressOf(Mutability::Not, place) => {
495+
| Rvalue::RawPtr(Mutability::Not, place) => {
496496
let borrowed_place_has_mut_interior = qualifs::in_place::<HasMutInterior, _>(
497497
self.ccx,
498498
&mut |local| self.qualifs.has_mut_interior(self.ccx, local, location),

compiler/rustc_const_eval/src/check_consts/qualifs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ where
291291
in_operand::<Q, _>(cx, in_local, lhs) || in_operand::<Q, _>(cx, in_local, rhs)
292292
}
293293

294-
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
294+
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
295295
// Special-case reborrows to be more like a copy of the reference.
296296
if let Some((place_base, ProjectionElem::Deref)) = place.as_ref().last_projection() {
297297
let base_ty = place_base.ty(cx.body, cx.tcx).ty;

compiler/rustc_const_eval/src/check_consts/resolver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ where
9696
}
9797

9898
fn address_of_allows_mutation(&self) -> bool {
99-
// Exact set of permissions granted by AddressOf is undecided. Conservatively assume that
99+
// Exact set of permissions granted by RawPtr is undecided. Conservatively assume that
100100
// it might allow mutation until resolution of #56604.
101101
true
102102
}
@@ -170,7 +170,7 @@ where
170170
self.super_rvalue(rvalue, location);
171171

172172
match rvalue {
173-
mir::Rvalue::AddressOf(_mt, borrowed_place) => {
173+
mir::Rvalue::RawPtr(_mt, borrowed_place) => {
174174
if !borrowed_place.is_indirect() && self.address_of_allows_mutation() {
175175
let place_ty = borrowed_place.ty(self.ccx.body, self.ccx.tcx).ty;
176176
if Q::in_any_value_of_ty(self.ccx, place_ty) {

compiler/rustc_const_eval/src/interpret/step.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
234234
self.write_immediate(*val, &dest)?;
235235
}
236236

237-
AddressOf(_, place) => {
237+
RawPtr(_, place) => {
238238
// Figure out whether this is an addr_of of an already raw place.
239239
let place_base_raw = if place.is_indirect_first_projection() {
240240
let ty = self.frame().body.local_decls[place.local].ty;

compiler/rustc_hir_typeck/src/cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
965965
// need to special-case obtaining a raw pointer
966966
// from a region pointer to a vector.
967967

968-
// Coerce to a raw pointer so that we generate AddressOf in MIR.
968+
// Coerce to a raw pointer so that we generate RawPtr in MIR.
969969
let array_ptr_type = Ty::new_ptr(fcx.tcx, m_expr.ty, m_expr.mutbl);
970970
fcx.coerce(self.expr, self.expr_ty, array_ptr_type, AllowTwoPhase::No, None)
971971
.unwrap_or_else(|_| {

compiler/rustc_middle/src/mir/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
10381038

10391039
CopyForDeref(ref place) => write!(fmt, "deref_copy {place:#?}"),
10401040

1041-
AddressOf(mutability, ref place) => {
1041+
RawPtr(mutability, ref place) => {
10421042
write!(fmt, "&raw {mut_str} {place:?}", mut_str = mutability.ptr_str())
10431043
}
10441044

compiler/rustc_middle/src/mir/statement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ impl<'tcx> Rvalue<'tcx> {
423423
| Rvalue::Repeat(_, _)
424424
| Rvalue::Ref(_, _, _)
425425
| Rvalue::ThreadLocalRef(_)
426-
| Rvalue::AddressOf(_, _)
426+
| Rvalue::RawPtr(_, _)
427427
| Rvalue::Len(_)
428428
| Rvalue::Cast(
429429
CastKind::IntToInt

compiler/rustc_middle/src/mir/syntax.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1293,14 +1293,14 @@ pub enum Rvalue<'tcx> {
12931293
/// nature of this operation?
12941294
ThreadLocalRef(DefId),
12951295

1296-
/// Creates a pointer with the indicated mutability to the place.
1296+
/// Creates a raw pointer with the indicated mutability to the place.
12971297
///
1298-
/// This is generated by pointer casts like `&v as *const _` or raw address of expressions like
1299-
/// `&raw v` or `addr_of!(v)`.
1298+
/// This is generated by pointer casts like `&v as *const _` or raw borrow expressions like
1299+
/// `&raw const v`.
13001300
///
13011301
/// Like with references, the semantics of this operation are heavily dependent on the aliasing
13021302
/// model.
1303-
AddressOf(Mutability, Place<'tcx>),
1303+
RawPtr(Mutability, Place<'tcx>),
13041304

13051305
/// Yields the length of the place, as a `usize`.
13061306
///

compiler/rustc_middle/src/mir/tcx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl<'tcx> Rvalue<'tcx> {
170170
let place_ty = place.ty(local_decls, tcx).ty;
171171
Ty::new_ref(tcx, reg, place_ty, bk.to_mutbl_lossy())
172172
}
173-
Rvalue::AddressOf(mutability, ref place) => {
173+
Rvalue::RawPtr(mutability, ref place) => {
174174
let place_ty = place.ty(local_decls, tcx).ty;
175175
Ty::new_ptr(tcx, place_ty, mutability)
176176
}

compiler/rustc_middle/src/mir/visit.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,13 @@ macro_rules! make_mir_visitor {
682682
);
683683
}
684684

685-
Rvalue::AddressOf(m, path) => {
685+
Rvalue::RawPtr(m, path) => {
686686
let ctx = match m {
687687
Mutability::Mut => PlaceContext::MutatingUse(
688-
MutatingUseContext::AddressOf
688+
MutatingUseContext::RawBorrow
689689
),
690690
Mutability::Not => PlaceContext::NonMutatingUse(
691-
NonMutatingUseContext::AddressOf
691+
NonMutatingUseContext::RawBorrow
692692
),
693693
};
694694
self.visit_place(path, ctx, location);
@@ -1299,8 +1299,8 @@ pub enum NonMutatingUseContext {
12991299
/// FIXME: do we need to distinguish shallow and deep fake borrows? In fact, do we need to
13001300
/// distinguish fake and normal deep borrows?
13011301
FakeBorrow,
1302-
/// AddressOf for *const pointer.
1303-
AddressOf,
1302+
/// `&raw const`.
1303+
RawBorrow,
13041304
/// PlaceMention statement.
13051305
///
13061306
/// This statement is executed as a check that the `Place` is live without reading from it,
@@ -1333,8 +1333,8 @@ pub enum MutatingUseContext {
13331333
Drop,
13341334
/// Mutable borrow.
13351335
Borrow,
1336-
/// AddressOf for *mut pointer.
1337-
AddressOf,
1336+
/// `&raw mut`.
1337+
RawBorrow,
13381338
/// Used as base for another place, e.g., `x` in `x.y`. Could potentially mutate the place.
13391339
/// For example, the projection `x.y` is marked as a mutation in these cases:
13401340
/// ```ignore (illustrative)
@@ -1386,8 +1386,8 @@ impl PlaceContext {
13861386
pub fn is_address_of(&self) -> bool {
13871387
matches!(
13881388
self,
1389-
PlaceContext::NonMutatingUse(NonMutatingUseContext::AddressOf)
1390-
| PlaceContext::MutatingUse(MutatingUseContext::AddressOf)
1389+
PlaceContext::NonMutatingUse(NonMutatingUseContext::RawBorrow)
1390+
| PlaceContext::MutatingUse(MutatingUseContext::RawBorrow)
13911391
)
13921392
}
13931393

compiler/rustc_middle/src/thir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ pub enum ExprKind<'tcx> {
407407
arg: ExprId,
408408
},
409409
/// A `&raw [const|mut] $place_expr` raw borrow resulting in type `*[const|mut] T`.
410-
AddressOf {
410+
RawBorrow {
411411
mutability: hir::Mutability,
412412
arg: ExprId,
413413
},

compiler/rustc_middle/src/thir/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn walk_expr<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(
9292
}
9393
VarRef { id: _ } | UpvarRef { closure_def_id: _, var_hir_id: _ } => {}
9494
Borrow { arg, borrow_kind: _ } => visitor.visit_expr(&visitor.thir()[arg]),
95-
AddressOf { arg, mutability: _ } => visitor.visit_expr(&visitor.thir()[arg]),
95+
RawBorrow { arg, mutability: _ } => visitor.visit_expr(&visitor.thir()[arg]),
9696
Break { value, label: _ } => {
9797
if let Some(value) = value {
9898
visitor.visit_expr(&visitor.thir()[value])

compiler/rustc_mir_build/src/build/custom/parse/instruction.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ impl<'tcx, 'body> ParseCtxt<'tcx, 'body> {
244244
ExprKind::Borrow { borrow_kind, arg } => Ok(
245245
Rvalue::Ref(self.tcx.lifetimes.re_erased, *borrow_kind, self.parse_place(*arg)?)
246246
),
247-
ExprKind::AddressOf { mutability, arg } => Ok(
248-
Rvalue::AddressOf(*mutability, self.parse_place(*arg)?)
247+
ExprKind::RawBorrow { mutability, arg } => Ok(
248+
Rvalue::RawPtr(*mutability, self.parse_place(*arg)?)
249249
),
250250
ExprKind::Binary { op, lhs, rhs } => Ok(
251251
Rvalue::BinaryOp(*op, Box::new((self.parse_operand(*lhs)?, self.parse_operand(*rhs)?)))

compiler/rustc_mir_build/src/build/expr/as_place.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
542542
| ExprKind::PointerCoercion { .. }
543543
| ExprKind::Repeat { .. }
544544
| ExprKind::Borrow { .. }
545-
| ExprKind::AddressOf { .. }
545+
| ExprKind::RawBorrow { .. }
546546
| ExprKind::Match { .. }
547547
| ExprKind::If { .. }
548548
| ExprKind::Loop { .. }

compiler/rustc_mir_build/src/build/expr/as_rvalue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
512512
| ExprKind::NeverToAny { .. }
513513
| ExprKind::Use { .. }
514514
| ExprKind::Borrow { .. }
515-
| ExprKind::AddressOf { .. }
515+
| ExprKind::RawBorrow { .. }
516516
| ExprKind::Adt { .. }
517517
| ExprKind::Loop { .. }
518518
| ExprKind::LogicalOp { .. }

compiler/rustc_mir_build/src/build/expr/category.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Category {
5151
| ExprKind::Use { .. }
5252
| ExprKind::Adt { .. }
5353
| ExprKind::Borrow { .. }
54-
| ExprKind::AddressOf { .. }
54+
| ExprKind::RawBorrow { .. }
5555
| ExprKind::Yield { .. }
5656
| ExprKind::Call { .. }
5757
| ExprKind::InlineAsm { .. } => Some(Category::Rvalue(RvalueFunc::Into)),

compiler/rustc_mir_build/src/build/expr/into.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
303303
this.cfg.push_assign(block, source_info, destination, borrow);
304304
block.unit()
305305
}
306-
ExprKind::AddressOf { mutability, arg } => {
306+
ExprKind::RawBorrow { mutability, arg } => {
307307
let place = match mutability {
308308
hir::Mutability::Not => this.as_read_only_place(block, arg),
309309
hir::Mutability::Mut => this.as_place(block, arg),
310310
};
311-
let address_of = Rvalue::AddressOf(mutability, unpack!(block = place));
311+
let address_of = Rvalue::RawPtr(mutability, unpack!(block = place));
312312
this.cfg.push_assign(block, source_info, destination, address_of);
313313
block.unit()
314314
}

compiler/rustc_mir_build/src/check_unsafety.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ impl<'a, 'tcx> Visitor<'a, 'tcx> for UnsafetyVisitor<'a, 'tcx> {
373373
| ExprKind::Scope { .. }
374374
| ExprKind::Cast { .. } => {}
375375

376-
ExprKind::AddressOf { .. }
376+
ExprKind::RawBorrow { .. }
377377
| ExprKind::Adt { .. }
378378
| ExprKind::Array { .. }
379379
| ExprKind::Binary { .. }
@@ -474,7 +474,7 @@ impl<'a, 'tcx> Visitor<'a, 'tcx> for UnsafetyVisitor<'a, 'tcx> {
474474
}
475475
}
476476
}
477-
ExprKind::AddressOf { arg, .. } => {
477+
ExprKind::RawBorrow { arg, .. } => {
478478
if let ExprKind::Scope { value: arg, .. } = self.thir[arg].kind
479479
// THIR desugars UNSAFE_STATIC into *UNSAFE_STATIC_REF, where
480480
// UNSAFE_STATIC_REF holds the addr of the UNSAFE_STATIC, so: take two steps

0 commit comments

Comments
 (0)