Skip to content

Commit 9fd2832

Browse files
authored
Rollup merge of #129355 - RalfJung:PlaceMention, r=compiler-errors
fix comment on PlaceMention semantics It seems this was simply missed in #114330.
2 parents 4137f3b + 9010708 commit 9fd2832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/mir/syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ pub enum StatementKind<'tcx> {
395395
/// `PlaceMention(PLACE)`.
396396
///
397397
/// When executed at runtime, this computes the given place, but then discards
398-
/// it without doing a load. It is UB if the place is not pointing to live memory.
398+
/// it without doing a load. `let _ = *ptr;` is fine even if the pointer is dangling.
399399
PlaceMention(Box<Place<'tcx>>),
400400

401401
/// Encodes a user's type ascription. These need to be preserved

0 commit comments

Comments
 (0)