We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eab08be commit b3c133dCopy full SHA for b3c133d
src/types.rs
@@ -681,13 +681,14 @@ impl CompInfo {
681
if self.no_copy {
682
return false;
683
}
684
+
685
+ if self.has_destructor() {
686
+ return false;
687
+ }
688
689
match self.kind {
690
CompKind::Union => true,
691
CompKind::Struct => {
- if self.has_destructor() {
- return false;
- }
-
692
// With template args, use a safe subset of the types,
693
// since copyability depends on the types itself.
694
self.ref_template.as_ref().map_or(true, |t| t.can_derive_copy()) &&
0 commit comments