]> git.lizzy.rs Git - rust.git/commitdiff
Add comment for the current retag situation
authorJannis Christopher Köhl <mail@koehl.dev>
Wed, 12 Oct 2022 21:46:31 +0000 (23:46 +0200)
committerJannis Christopher Köhl <mail@koehl.dev>
Mon, 7 Nov 2022 09:35:22 +0000 (10:35 +0100)
compiler/rustc_mir_dataflow/src/value_analysis.rs

index 9ae87418bc8b9ebe36a5b44d9eb179e61431c1cd..116a8b7bd4081cb04c6160cb416534f737ca6118 100644 (file)
@@ -114,8 +114,13 @@ fn super_statement(&self, statement: &Statement<'tcx>, state: &mut State<Self::V
                 // (A2)
                 state.flood_with(place.as_ref(), self.map(), Self::Value::bottom());
             }
+            StatementKind::Retag(..) => {
+                // A retag modifies the provenance of references. Currently references are only
+                // tracked if `-Zunsound-mir-opts` is given, but this might change in the future.
+                // However, it is still unclear how retags should be handled:
+                // https://github.com/rust-lang/rust/pull/101168#discussion_r985304895
+            }
             StatementKind::Nop
-            | StatementKind::Retag(..)
             | StatementKind::FakeRead(..)
             | StatementKind::Coverage(..)
             | StatementKind::AscribeUserType(..) => (),