about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-05-27 13:01:42 +0200
committerGitHub <noreply@github.com>2025-05-27 13:01:42 +0200
commit2de2e652ad0d6821a09d9c72f15c4bef36df6e9d (patch)
tree261d91c0daa0007367576afb624df4206cf01df0
parent4b47bd439e41d036d4ca2dba0ca7b9c80d221381 (diff)
parent19802e8e9cf2732768c89dcfe1c5fa0eb88cd558 (diff)
downloadrust-2de2e652ad0d6821a09d9c72f15c4bef36df6e9d.tar.gz
rust-2de2e652ad0d6821a09d9c72f15c4bef36df6e9d.zip
Rollup merge of #141599 - nnethercote:rm-Box-into_inner, r=fmease,chenyukang
Remove an unnecessary use of `Box::into_inner`.

r? ```@chenyukang```
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs2
-rw-r--r--compiler/rustc_errors/src/lib.rs1
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 539ecfbb42e..a11f81b55bb 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -1325,7 +1325,7 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> {
             ));
             self.note("consider using `--verbose` to print the full type name to the console");
         }
-        Box::into_inner(self.diag.take().unwrap())
+        *self.diag.take().unwrap()
     }
 
     /// This method allows us to access the path of the file where "long types" are written to.
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index f8e19e50778..bd421a441f9 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -12,7 +12,6 @@
 #![feature(array_windows)]
 #![feature(assert_matches)]
 #![feature(associated_type_defaults)]
-#![feature(box_into_inner)]
 #![feature(box_patterns)]
 #![feature(default_field_values)]
 #![feature(error_reporter)]