diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-14 21:55:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-14 21:55:40 +0200 |
| commit | 04d10520f018862c780388d886fb336b80e09ee6 (patch) | |
| tree | 87f148f04bc60f0f5e078cdf3a3ddb1995a5e33a /compiler/rustc_codegen_llvm/src | |
| parent | 7dc3feccddb02c1f0331c56320db138f78d85be1 (diff) | |
| parent | 4b63362f3d0a455707f64ce345ca3a5467b04764 (diff) | |
| download | rust-04d10520f018862c780388d886fb336b80e09ee6.tar.gz rust-04d10520f018862c780388d886fb336b80e09ee6.zip | |
Rollup merge of #139811 - yotamofek:pr/newtype_cleanups, r=oli-obk
Use `newtype_index!`-generated types more idiomatically Continuation of sorts of #139674 Shouldn't affect anything, just makes some code simpler
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs b/compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs index f52991b3697..d2591139d6e 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs @@ -3,7 +3,6 @@ use std::collections::hash_map::Entry; use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext}; use rustc_codegen_ssa::traits::*; use rustc_data_structures::fx::FxHashMap; -use rustc_index::Idx; use rustc_index::bit_set::DenseBitSet; use rustc_middle::mir::{Body, SourceScope}; use rustc_middle::ty::layout::{FnAbiOf, HasTypingEnv}; @@ -43,8 +42,7 @@ pub(crate) fn compute_mir_scopes<'ll, 'tcx>( let mut instantiated = DenseBitSet::new_empty(mir.source_scopes.len()); let mut discriminators = FxHashMap::default(); // Instantiate all scopes. - for idx in 0..mir.source_scopes.len() { - let scope = SourceScope::new(idx); + for scope in mir.source_scopes.indices() { make_mir_scope( cx, instance, |
