Ignore PhantomPinned

cbindgen already ignores `PhantomData`.  It should ignore
`PhantomPinned` for the same reasons.

Closes #695
Fixes #694
This commit is contained in:
Kendall Koning
2021-06-18 14:27:18 -04:00
committed by Emilio Cobos Álvarez
parent 2d20c4b151
commit 4e394493d6
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -159,6 +159,7 @@ cbindgen contains the following hardcoded mappings (again completely ignoring na
* f64 => double
* VaList => va_list
* PhantomData => *evaporates*, can only appear as the field of a type
* PhantomPinned => *evaporates*, can only appear as the field of a type
* () => *evaporates*, can only appear as the field of a type
+1 -1
View File
@@ -398,7 +398,7 @@ impl Type {
syn::Type::Path(ref path) => {
let generic_path = GenericPath::load(&path.path)?;
if generic_path.name() == "PhantomData" {
if generic_path.name() == "PhantomData" || generic_path.name() == "PhantomPinned" {
return Ok(None);
}
+1
View File
@@ -17,6 +17,7 @@ struct NormalWithZST {
y: f32,
z: (),
w: PhantomData<i32>,
v: PhantomPinned,
}
/// cbindgen:rename-all=GeckoCase