From 45b2ae935dbc9feb18e9cb9f87ae04d5978e1669 Mon Sep 17 00:00:00 2001 From: dianne Date: Thu, 19 Dec 2024 11:12:31 -0800 Subject: [PATCH] remove the unused `ConstraintCategory::ClosureBounds` --- compiler/rustc_borrowck/src/diagnostics/region_errors.rs | 1 - compiler/rustc_middle/src/mir/query.rs | 5 ----- 2 files changed, 6 deletions(-) diff --git a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs index 78809908180..3e90ecbaf5b 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs @@ -50,7 +50,6 @@ impl<'tcx> ConstraintDescription for ConstraintCategory<'tcx> { ConstraintCategory::Cast { is_implicit_coercion: true, .. } => "coercion ", ConstraintCategory::CallArgument(_) => "argument ", ConstraintCategory::TypeAnnotation => "type annotation ", - ConstraintCategory::ClosureBounds => "closure body ", ConstraintCategory::SizedBound => "proving this value is `Sized` ", ConstraintCategory::CopyBound => "copying this value ", ConstraintCategory::OpaqueType => "opaque type ", diff --git a/compiler/rustc_middle/src/mir/query.rs b/compiler/rustc_middle/src/mir/query.rs index c2bb95a91c4..9943914628e 100644 --- a/compiler/rustc_middle/src/mir/query.rs +++ b/compiler/rustc_middle/src/mir/query.rs @@ -241,11 +241,6 @@ pub enum ConstraintCategory<'tcx> { unsize_to: Option>, }, - /// A constraint that came from checking the body of a closure. - /// - /// We try to get the category that the closure used when reporting this. - ClosureBounds, - /// Contains the function type if available. CallArgument(#[derive_where(skip)] Option>), CopyBound,