File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ fn is_value_unfrozen_raw<'tcx>(
149
149
// the fact that we have to dig into every structs to search enums
150
150
// leads us to the point checking `UnsafeCell` directly is the only option.
151
151
ty:: Adt ( ty_def, ..) if ty_def. is_unsafe_cell ( ) => true ,
152
+ // As of 2022-09-08 miri doesn't track which union field is active so there's no safe way to check the
153
+ // contained value.
154
+ ty:: Adt ( def, ..) if def. is_union ( ) => false ,
152
155
ty:: Array ( ..) | ty:: Adt ( ..) | ty:: Tuple ( ..) => {
153
156
let val = cx. tcx . destructure_mir_constant ( cx. param_env , val) ;
154
157
val. fields . iter ( ) . any ( |field| inner ( cx, * field) )
Original file line number Diff line number Diff line change
1
+ const UNINIT : core:: mem:: MaybeUninit < core:: cell:: Cell < & ' static ( ) > > = core:: mem:: MaybeUninit :: uninit ( ) ;
2
+
3
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments