Skip to content

Commit 9010708

Browse files
committed
fix comment on PlaceMention semantics
1 parent 59a74db commit 9010708

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)