diff options
| author | Irina Popa <irinagpopa@gmail.com> | 2018-07-17 18:26:58 +0300 |
|---|---|---|
| committer | Irina Popa <irinagpopa@gmail.com> | 2018-07-30 20:35:08 +0300 |
| commit | 265f2fa4de8fee5ad2e2c21904e51622de2aec24 (patch) | |
| tree | 71c40df2e1a7c013222b475141f8445a352cc346 /src/librustc_codegen_llvm/common.rs | |
| parent | ba006440eeae07cb6d6285a6b64f4374754d2300 (diff) | |
| download | rust-265f2fa4de8fee5ad2e2c21904e51622de2aec24.tar.gz rust-265f2fa4de8fee5ad2e2c21904e51622de2aec24.zip | |
rustc_codegen_llvm: fix tidy errors.
Diffstat (limited to 'src/librustc_codegen_llvm/common.rs')
| -rw-r--r-- | src/librustc_codegen_llvm/common.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/common.rs b/src/librustc_codegen_llvm/common.rs index 2d0ef7b3eef..51fc610408b 100644 --- a/src/librustc_codegen_llvm/common.rs +++ b/src/librustc_codegen_llvm/common.rs @@ -183,7 +183,11 @@ pub fn C_u8(cx: &CodegenCx<'ll, '_>, i: u8) -> &'ll Value { // This is a 'c-like' raw string, which differs from // our boxed-and-length-annotated strings. -pub fn C_cstr(cx: &CodegenCx<'ll, '_>, s: LocalInternedString, null_terminated: bool) -> &'ll Value { +pub fn C_cstr( + cx: &CodegenCx<'ll, '_>, + s: LocalInternedString, + null_terminated: bool, +) -> &'ll Value { unsafe { if let Some(&llval) = cx.const_cstr_cache.borrow().get(&s) { return llval; @@ -225,7 +229,11 @@ pub fn C_struct(cx: &CodegenCx<'ll, '_>, elts: &[&'ll Value], packed: bool) -> & C_struct_in_context(cx.llcx, elts, packed) } -pub fn C_struct_in_context(llcx: &'ll llvm::Context, elts: &[&'ll Value], packed: bool) -> &'ll Value { +pub fn C_struct_in_context( + llcx: &'ll llvm::Context, + elts: &[&'ll Value], + packed: bool, +) -> &'ll Value { unsafe { llvm::LLVMConstStructInContext(llcx, elts.as_ptr(), elts.len() as c_uint, |
