Skip to content

Commit 30fb027

Browse files
committed
comment
1 parent 3318657 commit 30fb027

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stacked_borrows.rs

+2
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
633633
}
634634

635635
// We only reborrow "bare" references/boxes.
636+
// Not traversing into fields helps with <https://github.com/rust-lang/unsafe-code-guidelines/issues/125>,
637+
// but might also cost us optimization and analyses. We will have to experiment more with this.
636638
if let Some((mutbl, protector)) = qualify(place.layout.ty, kind) {
637639
// Fast path.
638640
let val = this.read_immediate(this.place_to_op(place)?)?;

0 commit comments

Comments
 (0)