Skip to content

Commit 4d4b0f1

Browse files
committed
remove and bless
1 parent f1c5f34 commit 4d4b0f1

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

compiler/rustc_middle/src/mir/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,6 @@ impl<'tcx> LocalDecl<'tcx> {
11801180
}
11811181
}
11821182

1183-
pub fn temp(mut self) {
1184-
self.local_info = Some(Box::new(LocalInfo::Temp));
1185-
}
1186-
11871183
/// Converts `self` into same `LocalDecl` except tagged as internal.
11881184
#[inline]
11891185
pub fn internal(mut self) -> Self {

compiler/rustc_mir_transform/src/add_retag.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ fn may_be_reference(ty: Ty<'_>) -> bool {
5959

6060
/// Determines whether or not this LocalDecl is temp, if not it needs retagging.
6161
fn is_not_temp<'tcx>(local_decl: &LocalDecl<'tcx>) -> bool {
62-
if local_decl.local_info.is_some() {
63-
match local_decl.local_info.as_ref().unwrap().as_ref() {
62+
if let Some(local_info) = &local_decl.local_info {
63+
match local_info.as_ref() {
6464
LocalInfo::Temp => return false,
6565
_ => (),
6666
};

src/test/run-make/const_fn_mir/dump.mir

-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ fn foo() -> i32 {
2323
_0 = move (_1.0: i32); // scope 0 at main.rs:5:5: 5:10
2424
return; // scope 0 at main.rs:6:2: 6:2
2525
}
26-
27-
bb2 (cleanup): {
28-
resume; // scope 0 at main.rs:4:1: 6:2
29-
}
3026
}
3127

3228
fn main() -> () {

0 commit comments

Comments
 (0)