Add #[derive(Clone, Copy)]
to anonymous adts
Fix the `AssertBoundIsClone` error for anonymous adts.
This commit is contained in:
parent
822d6dc5fd
commit
2b04ca94bb
5 changed files with 193 additions and 176 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue