Skip to content

Commit 95c5758

Browse files
committed
Allow UniquePtr to trivial aliases.
More thought needed here...
1 parent 296ea5c commit 95c5758

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

macro/src/expand.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ fn expand(ffi: Module, apis: &[Api], types: &Types) -> TokenStream {
8080
}
8181
} else if let Type::UniquePtr(ptr) = ty {
8282
if let Type::Ident(ident) = &ptr.inner {
83-
if Atom::from(ident).is_none() && !types.aliases.contains_key(ident) {
83+
if Atom::from(ident).is_none() && !(types.aliases.contains_key(ident)
84+
&& !types.required_trivial_aliases.contains(ident)) {
8485
expanded.extend(expand_unique_ptr(namespace, ident, types));
8586
}
8687
}

0 commit comments

Comments
 (0)