Skip to content

Commit 3b01fba

Browse files
committed
fix(intrinsic/mod.rs): Update comments
1 parent 4e4efb9 commit 3b01fba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/intrinsic/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
119119
let result = PlaceRef::new_sized(llresult, fn_abi.ret.layout);
120120

121121
let simple = get_simple_intrinsic(self, name);
122+
123+
// FIXME(tempdragon): Re-enable `clippy::suspicious_else_formatting` if the following issue is solved:
124+
// https://github.com/rust-lang/rust-clippy/issues/12497
125+
// and leave `else if use_integer_compare` to be placed "as is".
122126
#[allow(clippy::suspicious_else_formatting)]
123127
let llval = match name {
124128
_ if simple.is_some() => {
@@ -164,7 +168,6 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
164168
sym::volatile_load | sym::unaligned_volatile_load => {
165169
let tp_ty = fn_args.type_at(0);
166170
let ptr = args[0].immediate();
167-
// The reference was changed to clone to comply to clippy.
168171
let load = if let PassMode::Cast { cast: ref ty, pad_i32: _ } = fn_abi.ret.mode {
169172
let gcc_ty = ty.gcc_type(self);
170173
self.volatile_load(gcc_ty, ptr)
@@ -307,8 +310,6 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
307310
let b = args[1].immediate();
308311
if layout.size().bytes() == 0 {
309312
self.const_bool(true)
310-
// The else if an immediate neighbor of this block.
311-
// It is moved here to comply to Clippy.
312313
}
313314
/*else if use_integer_compare {
314315
let integer_ty = self.type_ix(layout.size.bits()); // FIXME(antoyo): LLVM creates an integer of 96 bits for [i32; 3], but gcc doesn't support this, so it creates an integer of 128 bits.
@@ -386,7 +387,6 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
386387
};
387388

388389
if !fn_abi.ret.is_ignore() {
389-
// The reference was changed to clone to comply to clippy.
390390
if let PassMode::Cast { cast: ref ty, .. } = fn_abi.ret.mode {
391391
let ptr_llty = self.type_ptr_to(ty.gcc_type(self));
392392
let ptr = self.pointercast(result.llval, ptr_llty);

0 commit comments

Comments
 (0)