diff options
| author | bors <bors@rust-lang.org> | 2022-02-20 02:19:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-20 02:19:41 +0000 |
| commit | 25ad89e47b5a04bdcdd36069ae12f02cc848e553 (patch) | |
| tree | 01d95cce6d471bbb63cec92ac498dde3ebc6105a /compiler/rustc_codegen_llvm/src/base.rs | |
| parent | 26904687275a55864f32f3a7ba87b7711d063fd5 (diff) | |
| parent | f2d6770f779051f1f5a28451b68784d2103bca32 (diff) | |
| download | rust-25ad89e47b5a04bdcdd36069ae12f02cc848e553.tar.gz rust-25ad89e47b5a04bdcdd36069ae12f02cc848e553.zip | |
Auto merge of #94174 - matthiaskrgr:rollup-snyrlhy, r=matthiaskrgr
Rollup of 14 pull requests Successful merges: - #93580 (Stabilize pin_static_ref.) - #93639 (Release notes for 1.59) - #93686 (core: Implement ASCII trim functions on byte slices) - #94002 (rustdoc: Avoid duplicating macros in sidebar) - #94019 (removing architecture requirements for RustyHermit) - #94023 (adapt static-nobundle test to use llvm-nm) - #94091 (Fix rustdoc const computed value) - #94093 (Fix pretty printing of enums without variants) - #94097 (Add module-level docs for `rustc_middle::query`) - #94112 (Optimize char_try_from_u32) - #94113 (document rustc_middle::mir::Field) - #94122 (Fix miniz_oxide types showing up in std docs) - #94142 (rustc_typeck: adopt let else in more places) - #94146 (Adopt let else in more places) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/base.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs index 7b6ce5ea89b..e15b86aa84f 100644 --- a/compiler/rustc_codegen_llvm/src/base.rs +++ b/compiler/rustc_codegen_llvm/src/base.rs @@ -138,10 +138,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol) -> (ModuleCodegen } pub fn set_link_section(llval: &Value, attrs: &CodegenFnAttrs) { - let sect = match attrs.link_section { - Some(name) => name, - None => return, - }; + let Some(sect) = attrs.link_section else { return }; unsafe { let buf = SmallCStr::new(sect.as_str()); llvm::LLVMSetSection(llval, buf.as_ptr()); |
