diff options
| author | bors <bors@rust-lang.org> | 2023-04-03 16:41:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-03 16:41:49 +0000 |
| commit | bf41e753ec60da69f2393850ec5035063a573d95 (patch) | |
| tree | d03fada24938cfa2b54619985d852ab7bf6d66ca /compiler/rustc_codegen_llvm/src | |
| parent | 17675855094906ba90aca2f119be8fb7afc4d456 (diff) | |
| parent | a2ee7592d6b7c0daa62b7870ade85e0cc0acca05 (diff) | |
| download | rust-bf41e753ec60da69f2393850ec5035063a573d95.tar.gz rust-bf41e753ec60da69f2393850ec5035063a573d95.zip | |
Auto merge of #109819 - scottmcm:index-slice, r=WaffleLapkin
Use `&IndexSlice` instead of `&IndexVec` where possible All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*. r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs index c3439591b92..55a217f59f9 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs @@ -3,7 +3,7 @@ use rustc_codegen_ssa::debuginfo::{ wants_c_like_enum_debuginfo, }; use rustc_hir::def::CtorKind; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::{ bug, mir::{GeneratorLayout, GeneratorSavedLocal}, @@ -323,7 +323,7 @@ pub fn build_generator_variant_struct_type_di_node<'ll, 'tcx>( generator_type_and_layout: TyAndLayout<'tcx>, generator_type_di_node: &'ll DIType, generator_layout: &GeneratorLayout<'tcx>, - state_specific_upvar_names: &IndexVec<GeneratorSavedLocal, Option<Symbol>>, + state_specific_upvar_names: &IndexSlice<GeneratorSavedLocal, Option<Symbol>>, common_upvar_names: &[String], ) -> &'ll DIType { let variant_name = GeneratorSubsts::variant_name(variant_index); |
