remove and bless

This commit is contained in:
ouz-a 2022-04-29 18:29:38 +03:00
parent f1c5f34f76
commit 4d4b0f140f
3 changed files with 2 additions and 10 deletions

View File

@ -1180,10 +1180,6 @@ impl<'tcx> LocalDecl<'tcx> {
}
}
pub fn temp(mut self) {
self.local_info = Some(Box::new(LocalInfo::Temp));
}
/// Converts `self` into same `LocalDecl` except tagged as internal.
#[inline]
pub fn internal(mut self) -> Self {

View File

@ -59,8 +59,8 @@ fn may_be_reference(ty: Ty<'_>) -> bool {
/// Determines whether or not this LocalDecl is temp, if not it needs retagging.
fn is_not_temp<'tcx>(local_decl: &LocalDecl<'tcx>) -> bool {
if local_decl.local_info.is_some() {
match local_decl.local_info.as_ref().unwrap().as_ref() {
if let Some(local_info) = &local_decl.local_info {
match local_info.as_ref() {
LocalInfo::Temp => return false,
_ => (),
};

View File

@ -23,10 +23,6 @@ fn foo() -> i32 {
_0 = move (_1.0: i32); // scope 0 at main.rs:5:5: 5:10
return; // scope 0 at main.rs:6:2: 6:2
}
bb2 (cleanup): {
resume; // scope 0 at main.rs:4:1: 6:2
}
}
fn main() -> () {