]> git.lizzy.rs Git - rust.git/commitdiff
comment explaining force_align usage
authorRalf Jung <post@ralfj.de>
Wed, 22 Apr 2020 10:58:17 +0000 (12:58 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 22 Apr 2020 10:58:17 +0000 (12:58 +0200)
src/librustc_mir/interpret/place.rs

index 24e6833c2b43705e4718ba0cf137289a94944cc0..ddfd6ae0b8a28a7fc1ef48b6ef153a222e6db479 100644 (file)
@@ -358,6 +358,9 @@ pub(super) fn check_mplace_access(
 
     /// Return the "access-checked" version of this `MPlace`, where for non-ZST
     /// this is definitely a `Pointer`.
+    ///
+    /// `force_align` must only be used when correct alignment does not matter,
+    /// like in Stacked Borrows.
     pub fn mplace_access_checked(
         &self,
         mut place: MPlaceTy<'tcx, M::PointerTag>,