diff options
| author | bors <bors@rust-lang.org> | 2021-03-27 19:38:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-27 19:38:01 +0000 |
| commit | 9b0edb7fddacd6a60a380c1ce59159de597ab270 (patch) | |
| tree | 334eb1b9a4ec064bca2df01036caabb5d4b1ea09 /compiler/rustc_codegen_llvm/src/debuginfo | |
| parent | afaf33dcafe9c7068b63eb997df221aa08db7c29 (diff) | |
| parent | 7d6af6751c5726d884440d4e8d462a9ee6c5efc1 (diff) | |
| download | rust-9b0edb7fddacd6a60a380c1ce59159de597ab270.tar.gz rust-9b0edb7fddacd6a60a380c1ce59159de597ab270.zip | |
Auto merge of #83580 - Dylan-DPC:rollup-1zod4p7, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #81351 (combine: stop eagerly evaluating consts) - #82525 (make unaligned_references future-incompat lint warn-by-default) - #82626 (update array missing `IntoIterator` msg) - #82917 (Add function core::iter::zip) - #82993 (rustdoc: Use diagnostics for error when including sources) - #83522 (Improve fs error open_from unix) - #83548 (Always preserve `None`-delimited groups in a captured `TokenStream`) - #83555 (Add #[inline] to io::Error methods) Failed merges: - #83130 (escape_ascii take 2) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index d5b32e58cc3..d90e93f116c 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -1962,9 +1962,7 @@ fn prepare_enum_metadata( let discriminant_type_metadata = |discr: Primitive| { let enumerators_metadata: Vec<_> = match enum_type.kind() { - ty::Adt(def, _) => def - .discriminants(tcx) - .zip(&def.variants) + ty::Adt(def, _) => iter::zip(def.discriminants(tcx), &def.variants) .map(|((_, discr), v)| { let name = v.ident.as_str(); let is_unsigned = match discr.ty.kind() { @@ -2336,9 +2334,7 @@ fn compute_type_parameters(cx: &CodegenCx<'ll, 'tcx>, ty: Ty<'tcx>) -> &'ll DIAr if substs.types().next().is_some() { let generics = cx.tcx.generics_of(def.did); let names = get_parameter_names(cx, generics); - let template_params: Vec<_> = substs - .iter() - .zip(names) + let template_params: Vec<_> = iter::zip(substs, names) .filter_map(|(kind, name)| { if let GenericArgKind::Type(ty) = kind.unpack() { let actual_type = diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs index abb87cb3656..e157a38aa03 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs @@ -37,6 +37,7 @@ use rustc_target::abi::{LayoutOf, Primitive, Size}; use libc::c_uint; use smallvec::SmallVec; use std::cell::RefCell; +use std::iter; use tracing::debug; mod create_scope_map; @@ -448,9 +449,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> { // Again, only create type information if full debuginfo is enabled let template_params: Vec<_> = if cx.sess().opts.debuginfo == DebugInfo::Full { let names = get_parameter_names(cx, generics); - substs - .iter() - .zip(names) + iter::zip(substs, names) .filter_map(|(kind, name)| { if let GenericArgKind::Type(ty) = kind.unpack() { let actual_type = |
