mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:34:57 +00:00
[ty] Require that implementors of Constraints
also implement Debug
(#20348)
The debug representation isn't as useful as calling `.display(db)`, but it's still kind-of annoying when `dbg!()` calls don't compile locally due to the compiler not being able to guarantee that an object of type `impl Constraints` implements `Debug`
This commit is contained in:
parent
59c8fda3f8
commit
89f17467ef
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ fn incomparable<'db>(db: &'db dyn Db, left: Type<'db>, right: Type<'db>) -> bool
|
|||
}
|
||||
|
||||
/// Encodes the constraints under which a type property (e.g. assignability) holds.
|
||||
pub(crate) trait Constraints<'db>: Clone + Sized {
|
||||
pub(crate) trait Constraints<'db>: Clone + Sized + std::fmt::Debug {
|
||||
/// Returns a constraint set that never holds
|
||||
fn unsatisfiable(db: &'db dyn Db) -> Self;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue