1
Fork 0

fix ICE when using raw ptr in a pattern

This commit is contained in:
Ralf Jung 2023-12-24 11:09:58 +01:00
parent 3166bbef92
commit 41020d1337
3 changed files with 34 additions and 1 deletions

View file

@ -341,7 +341,7 @@ fn valtree_into_mplace<'tcx>(
ty::FnDef(_, _) => {
// Zero-sized type, nothing to do.
}
ty::Bool | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Char => {
ty::Bool | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Char | ty::RawPtr(..) => {
let scalar_int = valtree.unwrap_leaf();
debug!("writing trivial valtree {:?} to place {:?}", scalar_int, place);
ecx.write_immediate(Immediate::Scalar(scalar_int.into()), place).unwrap();