Skip to content

Commit a945bdf

Browse files
authored
Rollup merge of rust-lang#157330 - josetorrs:remove-is-type-const, r=BoxyUwU
remove `IsTypeConst` from `hir::TraitItemKind` Fixes rust-lang#152940 following up on rust-lang#152940 (comment) r? @BoxyUwU
2 parents 6c8aae7 + c60910b commit a945bdf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

clippy_lints/src/non_copy_const.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ impl<'tcx> LateLintPass<'tcx> for NonCopyConst<'tcx> {
757757
}
758758

759759
fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) {
760-
if let TraitItemKind::Const(_, ct_rhs_opt, _) = item.kind
760+
if let TraitItemKind::Const(_, ct_rhs_opt) = item.kind
761761
&& let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip()
762762
&& match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) {
763763
IsFreeze::No => true,
@@ -958,7 +958,7 @@ fn get_const_hir_value<'tcx>(
958958
{
959959
match tcx.hir_node(tcx.local_def_id_to_hir_id(did)) {
960960
Node::ImplItem(item) if let ImplItemKind::Const(.., ct_rhs) = item.kind => (did, ct_rhs),
961-
Node::TraitItem(item) if let TraitItemKind::Const(_, Some(ct_rhs), _) = item.kind => (did, ct_rhs),
961+
Node::TraitItem(item) if let TraitItemKind::Const(_, Some(ct_rhs)) = item.kind => (did, ct_rhs),
962962
_ => return None,
963963
}
964964
},

clippy_lints/src/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
514514
};
515515

516516
match item.kind {
517-
TraitItemKind::Const(ty, _, _) | TraitItemKind::Type(_, Some(ty)) => {
517+
TraitItemKind::Const(ty, _) | TraitItemKind::Type(_, Some(ty)) => {
518518
self.check_ty(cx, ty, context);
519519
},
520520
TraitItemKind::Fn(ref sig, trait_method) => {

0 commit comments

Comments
 (0)