Importing rustc-1.53.0
Bug: 194400612
Change-Id: Id2f38eeabc8325fff960e46b89b1cc7216f5227c
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
index 440e4d5..b928e90 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
@@ -1,5 +1,4 @@
-// See doc.rs for documentation.
-mod doc;
+#![doc = include_str!("doc.md")]
use rustc_codegen_ssa::mir::debuginfo::VariableKind::*;
@@ -38,6 +37,7 @@
use libc::c_uint;
use smallvec::SmallVec;
use std::cell::RefCell;
+use std::iter;
use tracing::debug;
mod create_scope_map;
@@ -344,7 +344,7 @@
spflags |= DISPFlags::SPFlagOptimized;
}
if let Some((id, _)) = self.tcx.entry_fn(LOCAL_CRATE) {
- if id.to_def_id() == def_id {
+ if id == def_id {
spflags |= DISPFlags::SPFlagMainSubprogram;
}
}
@@ -449,9 +449,7 @@
// 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 =