diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-03 18:41:12 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-23 23:54:37 +0000 |
| commit | 0460c92d527dbada3fde227d3f01e6d1e132a186 (patch) | |
| tree | 66d4e207102600eca2fe9e9cebda450b853f72d3 /compiler/rustc_monomorphize | |
| parent | 9ff071219bca913e45235568defadd5ab840c50a (diff) | |
| download | rust-0460c92d527dbada3fde227d3f01e6d1e132a186.tar.gz rust-0460c92d527dbada3fde227d3f01e6d1e132a186.zip | |
Remove useless lifetime parameter.
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 41457f417f2..d435e4e77b9 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -659,10 +659,7 @@ impl<'a, 'tcx> MirUsedCollector<'a, 'tcx> { } /// Evaluates a *not yet monomorphized* constant. - fn eval_constant( - &mut self, - constant: &mir::ConstOperand<'tcx>, - ) -> Option<mir::ConstValue<'tcx>> { + fn eval_constant(&mut self, constant: &mir::ConstOperand<'tcx>) -> Option<mir::ConstValue> { let const_ = self.monomorphize(constant.const_); // Evaluate the constant. This makes const eval failure a collection-time error (rather than // a codegen-time error). rustc stops after collection if there was an error, so this @@ -1355,17 +1352,15 @@ fn visit_mentioned_item<'tcx>( #[instrument(skip(tcx, output), level = "debug")] fn collect_const_value<'tcx>( tcx: TyCtxt<'tcx>, - value: mir::ConstValue<'tcx>, + value: mir::ConstValue, output: &mut MonoItems<'tcx>, ) { match value { mir::ConstValue::Scalar(Scalar::Ptr(ptr, _size)) => { collect_alloc(tcx, ptr.provenance.alloc_id(), output) } - mir::ConstValue::Indirect { alloc_id, .. } => collect_alloc(tcx, alloc_id, output), - mir::ConstValue::Slice { alloc_id, meta: _, phantom: _ } => { - collect_alloc(tcx, alloc_id, output); - } + mir::ConstValue::Indirect { alloc_id, .. } + | mir::ConstValue::Slice { alloc_id, meta: _ } => collect_alloc(tcx, alloc_id, output), _ => {} } } |
