Add #[derive(Clone, Copy)] to anonymous adts
Fix the `AssertBoundIsClone` error for anonymous adts.
This commit is contained in:
@@ -2161,6 +2161,10 @@ impl TyKind {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_anon_adt(&self) -> bool {
|
||||
matches!(self, TyKind::AnonStruct(..) | TyKind::AnonUnion(..))
|
||||
}
|
||||
}
|
||||
|
||||
/// Syntax used to declare a trait object.
|
||||
|
||||
Reference in New Issue
Block a user