Skip to content

Commit

Permalink
remove unused tcx
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehri01 committed Oct 17, 2023
1 parent 18f8022 commit 7684b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
if type_implements_negative_copy_modulo_regions(cx.tcx, ty, param_env) {
return;
}
if def_or_variant_marked_non_exhaustive(cx.tcx, def) {
if def_or_variant_marked_non_exhaustive(def) {
return;
}

Expand Down Expand Up @@ -733,7 +733,7 @@ fn type_implements_negative_copy_modulo_regions<'tcx>(
tcx.infer_ctxt().build().predicate_must_hold_modulo_regions(&obligation)
}

fn def_or_variant_marked_non_exhaustive<'tcx>(_tcx: TyCtxt<'tcx>, def: ty::AdtDef<'tcx>) -> bool {
fn def_or_variant_marked_non_exhaustive<'tcx>(def: ty::AdtDef<'tcx>) -> bool {
def.is_variant_list_non_exhaustive()
|| def.variants().iter().any(|variant| variant.is_field_list_non_exhaustive())
}
Expand Down

0 comments on commit 7684b8b

Please sign in to comment.