diff options
| author | bors <bors@rust-lang.org> | 2021-02-26 19:17:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-02-26 19:17:00 +0000 |
| commit | 9c09c1f7cfcf9de0522bcd1cfda32b552195c464 (patch) | |
| tree | 7fbf5611f6306f6ea0bb25d163d234cf17c3ac38 /compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | |
| parent | cecdb181ade91c0a5ffab9a148dba68fc7d00ee3 (diff) | |
| parent | 0da9b474de36bf7954ceb51a0e483cc39e9d60da (diff) | |
| download | rust-9c09c1f7cfcf9de0522bcd1cfda32b552195c464.tar.gz rust-9c09c1f7cfcf9de0522bcd1cfda32b552195c464.zip | |
Auto merge of #82552 - GuillaumeGomez:rollup-8dn1ztn, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #81940 (Stabilize str_split_once) - #82165 (Reword labels on E0308 involving async fn return type) - #82456 (Replaced some unwrap_or and map_or with lazy variants) - #82491 (Consider inexpensive inlining criteria first) - #82506 (Properly account for non-shorthand pattern field in unused variable lint) - #82535 (Set codegen thread names) - #82545 (rustdoc: add optional woff2 versions of FiraSans.) - #82549 (Revert "Update normalize.css to 8.0.1") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs index 955e739b2c1..c28b0d64651 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs @@ -481,9 +481,9 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> { } fn get_parameter_names(cx: &CodegenCx<'_, '_>, generics: &ty::Generics) -> Vec<Symbol> { - let mut names = generics - .parent - .map_or(vec![], |def_id| get_parameter_names(cx, cx.tcx.generics_of(def_id))); + let mut names = generics.parent.map_or_else(Vec::new, |def_id| { + get_parameter_names(cx, cx.tcx.generics_of(def_id)) + }); names.extend(generics.params.iter().map(|param| param.name)); names } |
