mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Auto merge of #16451 - Urhengulas:satisfy-clippy, r=Veykril
internal: Work through temporarily allowed clippy lints, part 2 Another follow-up to https://github.com/rust-lang/rust-analyzer/pull/16401.
This commit is contained in:
commit
850ba2fb63
39 changed files with 136 additions and 149 deletions
|
@ -84,8 +84,7 @@ impl TypeVisitor<Interner> for UninhabitedFrom<'_> {
|
|||
Some(0) | None => CONTINUE_OPAQUELY_INHABITED,
|
||||
Some(1..) => item_ty.super_visit_with(self, outer_binder),
|
||||
},
|
||||
|
||||
TyKind::Ref(..) | _ => CONTINUE_OPAQUELY_INHABITED,
|
||||
_ => CONTINUE_OPAQUELY_INHABITED,
|
||||
};
|
||||
self.recursive_ty.remove(ty);
|
||||
self.max_depth += 1;
|
||||
|
|
|
@ -114,7 +114,7 @@ impl MirLowerCtx<'_> {
|
|||
index: i as u32,
|
||||
}))
|
||||
}),
|
||||
&mut cond_place,
|
||||
&cond_place,
|
||||
mode,
|
||||
)?
|
||||
}
|
||||
|
|
|
@ -440,7 +440,7 @@ pub(crate) fn detect_variant_from_bytes<'a>(
|
|||
(db.enum_data(e).variants[index.0].0, layout)
|
||||
}
|
||||
hir_def::layout::Variants::Multiple { tag, tag_encoding, variants, .. } => {
|
||||
let size = tag.size(&*target_data_layout).bytes_usize();
|
||||
let size = tag.size(target_data_layout).bytes_usize();
|
||||
let offset = layout.fields.offset(0).bytes_usize(); // The only field on enum variants is the tag field
|
||||
let tag = i128::from_le_bytes(pad16(&b[offset..offset + size], false));
|
||||
match tag_encoding {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue