diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-07 00:56:32 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-12 20:03:09 +0100 |
| commit | 7b1b08cfee6881705eed931e24b8abd4e68ef328 (patch) | |
| tree | 010b9d151c0cec04ca87ddfc5b9cc775251c36b7 /src/librustc_codegen_llvm/llvm | |
| parent | 23de8275c9b5e5812dc54a12bdba6d80870d9dc8 (diff) | |
remove lifetimes that can be elided (clippy::needless_lifetimes)
Diffstat (limited to 'src/librustc_codegen_llvm/llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/llvm/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/llvm/mod.rs b/src/librustc_codegen_llvm/llvm/mod.rs index 96014cbee5d..a083e14979c 100644 --- a/src/librustc_codegen_llvm/llvm/mod.rs +++ b/src/librustc_codegen_llvm/llvm/mod.rs @@ -185,12 +185,12 @@ impl Drop for SectionIter<'a> { } } -pub fn mk_section_iter(llof: &'a ffi::ObjectFile) -> SectionIter<'a> { +pub fn mk_section_iter(llof: &ffi::ObjectFile) -> SectionIter<'_> { unsafe { SectionIter { llsi: LLVMGetSections(llof) } } } /// Safe wrapper around `LLVMGetParam`, because segfaults are no fun. -pub fn get_param(llfn: &'a Value, index: c_uint) -> &'a Value { +pub fn get_param(llfn: &Value, index: c_uint) -> &Value { unsafe { assert!( index < LLVMCountParams(llfn), @@ -203,7 +203,7 @@ pub fn get_param(llfn: &'a Value, index: c_uint) -> &'a Value { } /// Safe wrapper for `LLVMGetValueName2` into a byte slice -pub fn get_value_name(value: &'a Value) -> &'a [u8] { +pub fn get_value_name(value: &Value) -> &[u8] { unsafe { let mut len = 0; let data = LLVMGetValueName2(value, &mut len); |
