add stable_mir output test
This commit is contained in:
parent
d23e1a6894
commit
82ee18c4ea
4 changed files with 280 additions and 14 deletions
|
@ -58,18 +58,35 @@ pub fn pretty_statement(statement: &StatementKind) -> String {
|
|||
pretty.push_str(format!(" _{} = ", place.local).as_str());
|
||||
pretty.push_str(format!("{}", &pretty_rvalue(rval)).as_str());
|
||||
}
|
||||
StatementKind::FakeRead(_, _) => todo!(),
|
||||
StatementKind::SetDiscriminant { .. } => todo!(),
|
||||
StatementKind::Deinit(_) => todo!(),
|
||||
StatementKind::StorageLive(_) => todo!(),
|
||||
StatementKind::StorageDead(_) => todo!(),
|
||||
StatementKind::Retag(_, _) => todo!(),
|
||||
StatementKind::PlaceMention(_) => todo!(),
|
||||
StatementKind::AscribeUserType { .. } => todo!(),
|
||||
StatementKind::Coverage(_) => todo!(),
|
||||
StatementKind::Intrinsic(_) => todo!(),
|
||||
StatementKind::ConstEvalCounter => (),
|
||||
StatementKind::Nop => (),
|
||||
// FIXME: Add rest of the statements
|
||||
StatementKind::FakeRead(_, _) => {
|
||||
return String::from("StatementKind::FakeRead:Unimplemented");
|
||||
}
|
||||
StatementKind::SetDiscriminant { .. } => {
|
||||
return String::from("StatementKind::SetDiscriminant:Unimplemented");
|
||||
}
|
||||
StatementKind::Deinit(_) => return String::from("StatementKind::Deinit:Unimplemented"),
|
||||
StatementKind::StorageLive(_) => {
|
||||
return String::from("StatementKind::StorageLive:Unimplemented");
|
||||
}
|
||||
StatementKind::StorageDead(_) => {
|
||||
return String::from("StatementKind::StorageDead:Unimplemented");
|
||||
}
|
||||
StatementKind::Retag(_, _) => return String::from("StatementKind::Retag:Unimplemented"),
|
||||
StatementKind::PlaceMention(_) => {
|
||||
return String::from("StatementKind::PlaceMention:Unimplemented");
|
||||
}
|
||||
StatementKind::AscribeUserType { .. } => {
|
||||
return String::from("StatementKind::AscribeUserType:Unimplemented");
|
||||
}
|
||||
StatementKind::Coverage(_) => return String::from("StatementKind::Coverage:Unimplemented"),
|
||||
StatementKind::Intrinsic(_) => {
|
||||
return String::from("StatementKind::Intrinsic:Unimplemented");
|
||||
}
|
||||
StatementKind::ConstEvalCounter => {
|
||||
return String::from("StatementKind::ConstEvalCounter:Unimplemented");
|
||||
}
|
||||
StatementKind::Nop => return String::from("StatementKind::Nop:Unimplemented"),
|
||||
}
|
||||
pretty
|
||||
}
|
||||
|
@ -355,7 +372,7 @@ pub fn pretty_rvalue(rval: &Rvalue) -> String {
|
|||
pretty.push_str(" ");
|
||||
pretty.push_str(&pretty_ty(cnst.ty().kind()));
|
||||
}
|
||||
Rvalue::ShallowInitBox(_, _) => todo!(),
|
||||
Rvalue::ShallowInitBox(_, _) => (),
|
||||
Rvalue::ThreadLocalRef(item) => {
|
||||
pretty.push_str("thread_local_ref");
|
||||
pretty.push_str(format!("{:#?}", item).as_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue