remove some dead code

This commit is contained in:
Ralf Jung 2023-10-30 09:11:52 +01:00
parent 70a8e157ab
commit 03b24f2756

View File

@ -211,16 +211,6 @@ fn to_pat(
} else if !self.saw_const_match_lint.get() { } else if !self.saw_const_match_lint.get() {
if let Some(mir_structural_match_violation) = mir_structural_match_violation { if let Some(mir_structural_match_violation) = mir_structural_match_violation {
match non_sm_ty.kind() { match non_sm_ty.kind() {
ty::RawPtr(pointee)
if pointee.ty.is_sized(self.tcx(), self.param_env) => {}
ty::FnPtr(..) | ty::RawPtr(..) => {
self.tcx().emit_spanned_lint(
lint::builtin::POINTER_STRUCTURAL_MATCH,
self.id,
self.span,
PointerPattern,
);
}
ty::Adt(..) if mir_structural_match_violation => { ty::Adt(..) if mir_structural_match_violation => {
self.tcx().emit_spanned_lint( self.tcx().emit_spanned_lint(
lint::builtin::INDIRECT_STRUCTURAL_MATCH, lint::builtin::INDIRECT_STRUCTURAL_MATCH,