Skip to content

Commit a0fc2e6

Browse files
committed
codegen_llvm: remove explicit returns
1 parent b168e5f commit a0fc2e6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/librustc_codegen_llvm/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ impl Builder<'a, 'll, 'tcx> {
11941194
})
11951195
.collect();
11961196

1197-
return Cow::Owned(casted_args);
1197+
Cow::Owned(casted_args)
11981198
}
11991199

12001200
pub fn lifetime_start(&self, ptr: &'ll Value, size: Size) {

src/librustc_codegen_llvm/context.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -771,5 +771,6 @@ fn declare_intrinsic(cx: &CodegenCx<'ll, '_>, key: &str) -> Option<&'ll Value> {
771771
ifn!("llvm.dbg.declare", fn(Type::metadata(cx), Type::metadata(cx)) -> void);
772772
ifn!("llvm.dbg.value", fn(Type::metadata(cx), t_i64, Type::metadata(cx)) -> void);
773773
}
774-
return None;
774+
775+
None
775776
}

src/librustc_codegen_llvm/intrinsic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ fn get_rust_try_fn<'ll, 'tcx>(
972972
let output = tcx.types.i32;
973973
let rust_try = gen_fn(cx, "__rust_try", vec![fn_ty, i8p, i8p], output, codegen);
974974
cx.rust_try_fn.set(Some(rust_try));
975-
return rust_try
975+
rust_try
976976
}
977977

978978
fn span_invalid_monomorphization_error(a: &Session, b: Span, c: &str) {

0 commit comments

Comments
 (0)