From 9010708d9f5dc7e3377acc116a64573fadc7ed2b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 21 Aug 2024 15:52:06 +0200 Subject: [PATCH] fix comment on PlaceMention semantics --- compiler/rustc_middle/src/mir/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 51b4154ddab..748ca047754 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -395,7 +395,7 @@ pub enum StatementKind<'tcx> { /// `PlaceMention(PLACE)`. /// /// When executed at runtime, this computes the given place, but then discards - /// it without doing a load. It is UB if the place is not pointing to live memory. + /// it without doing a load. `let _ = *ptr;` is fine even if the pointer is dangling. PlaceMention(Box>), /// Encodes a user's type ascription. These need to be preserved