diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-06-14 23:01:22 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-06-19 10:44:01 -0700 |
| commit | e04e35133f28426df9fa61f9703da957d99b48d8 (patch) | |
| tree | d8a4e6cca8ba5ce3752e0e56f6520f4d5e18f873 /compiler/rustc_const_eval/src | |
| parent | 4630d1b23b996793e9188490cc99b1576176233f (diff) | |
`bug!` more uses of these in runtime stuff
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/cast.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/cast.rs b/compiler/rustc_const_eval/src/interpret/cast.rs index 6961e13c239..a13630ce084 100644 --- a/compiler/rustc_const_eval/src/interpret/cast.rs +++ b/compiler/rustc_const_eval/src/interpret/cast.rs @@ -70,9 +70,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { CastKind::PointerCoercion( PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer, ) => { - // These are NOPs, but can be wide pointers. - let v = self.read_immediate(src)?; - self.write_immediate(*v, dest)?; + bug!("{cast_kind:?} casts are for borrowck only, not runtime MIR"); } CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer) => { |
