File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -849,7 +849,7 @@ impl<'tcx> Ty<'tcx> {
849
849
///
850
850
/// Returning true means the type is known to be `Freeze`. Returning
851
851
/// `false` means nothing -- could be `Freeze`, might not be.
852
- fn is_trivially_freeze ( self ) -> bool {
852
+ pub fn is_trivially_freeze ( self ) -> bool {
853
853
match self . kind ( ) {
854
854
ty:: Int ( _)
855
855
| ty:: Uint ( _)
Original file line number Diff line number Diff line change @@ -674,7 +674,11 @@ impl Map {
674
674
return Err ( ( ) ) ;
675
675
}
676
676
677
- // FIXME: Check that the place is `Freeze`.
677
+ if !ty. is_trivially_freeze ( ) {
678
+ // Due to the way we deal with shared references, only `Freeze` types may be tracked.
679
+ // We are a little bit to restrictive here by only allowing trivially `Freeze` types.
680
+ return Err ( ( ) ) ;
681
+ }
678
682
679
683
let place = self . make_place ( local, projection) ?;
680
684
You can’t perform that action at this time.
0 commit comments