about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-26 20:35:36 -0500
committerGitHub <noreply@github.com>2024-11-26 20:35:36 -0500
commit145df3bd70342966c81a0f4e447f846e0d03cd8b (patch)
tree3089667369d89fd616c4a12da17bdb23e5d10308 /compiler/rustc_middle/src
parentdd2837ec5de4301a692e05a7c4475e980af57a57 (diff)
parent982cde9801e3603d944279a341fdfb94c69b125b (diff)
Rollup merge of #115293 - cjgillot:no-fuel, r=wesleywiser,DianQK
Remove -Zfuel.

I'm not sure this feature is used. I only found 2 references in a google search, both referring to its introduction.

Meanwhile, it's a global mutable state, untracked by incremental compilation, so incompatible with it.
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/context.rs4
-rw-r--r--compiler/rustc_middle/src/ty/mod.rs5
2 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index d982122e2aa..5bf62a17c8e 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -1566,10 +1566,6 @@ impl<'tcx> TyCtxt<'tcx> {
         }
     }
 
-    pub fn consider_optimizing<T: Fn() -> String>(self, msg: T) -> bool {
-        self.sess.consider_optimizing(|| self.crate_name(LOCAL_CRATE), msg)
-    }
-
     /// Obtain all lang items of this crate and all dependencies (recursively)
     pub fn lang_items(self) -> &'tcx rustc_hir::lang_items::LanguageItems {
         self.get_lang_items(())
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs
index 2b532701904..c7a2223ecd7 100644
--- a/compiler/rustc_middle/src/ty/mod.rs
+++ b/compiler/rustc_middle/src/ty/mod.rs
@@ -1558,10 +1558,7 @@ impl<'tcx> TyCtxt<'tcx> {
         let is_box = self.is_lang_item(did.to_def_id(), LangItem::OwnedBox);
 
         // This is here instead of layout because the choice must make it into metadata.
-        if is_box
-            || !self
-                .consider_optimizing(|| format!("Reorder fields of {:?}", self.def_path_str(did)))
-        {
+        if is_box {
             flags.insert(ReprFlags::IS_LINEAR);
         }