diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-05-02 20:22:13 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-05-27 18:58:51 +0200 |
| commit | a83f8d02eaf36b36a7ed495e43b8bf891b6fc1af (patch) | |
| tree | ab241607b1e29614e38ab0bc50526f084f1722e0 /compiler/rustc_monomorphize | |
| parent | 642e49bfed2481e54e252732be20d3c24cbec9e8 (diff) | |
| download | rust-a83f8d02eaf36b36a7ed495e43b8bf891b6fc1af.tar.gz rust-a83f8d02eaf36b36a7ed495e43b8bf891b6fc1af.zip | |
Always evaluate free lifetime-generic constants
Co-authored-by: Michael Goulet <michael@errs.io>
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index b3d7eaf332b..1ee977a5457 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1483,7 +1483,7 @@ impl<'v> RootCollector<'_, 'v> { // But even just declaring them must collect the items they refer to // unless their generics require monomorphization. - if !self.tcx.generics_of(id.owner_id).requires_monomorphization(self.tcx) + if !self.tcx.generics_of(id.owner_id).own_requires_monomorphization() && let Ok(val) = self.tcx.const_eval_poly(id.owner_id.to_def_id()) { collect_const_value(self.tcx, val, self.output); |
