We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5e4a85 commit 8968c8aCopy full SHA for 8968c8a
compiler/rustc_mir/src/transform/check_consts/validation.rs
@@ -595,8 +595,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
595
// Locals with StorageDead are definitely not part of the final constant value, and
596
// it is thus inherently safe to permit such locals to have their
597
// address taken as we can't end up with a reference to them in the
598
- // final value without creating a dangling pointer, which will cause
599
- // errors during validation.
+ // final value.
600
// Note: This is only sound if every local that has a `StorageDead` has a
601
// `StorageDead` in every control flow path leading to a `return` terminator.
602
if self.local_has_storage_dead(place.local) {
0 commit comments