fix ICE when using raw ptr in a pattern
This commit is contained in:
parent
3166bbef92
commit
41020d1337
3 changed files with 34 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue