Ignore PhantomPinned

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

Closes 
Fixes 
This commit is contained in:
Kendall Koning 2021-06-18 14:27:18 -04:00 committed by Emilio Cobos Álvarez
parent 2d20c4b151
commit 4e394493d6
No known key found for this signature in database
GPG Key ID: E1152D0994E4BF8A
3 changed files with 3 additions and 1 deletions
docs.md
src/bindgen/ir
tests/rust

@ -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

@ -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);
}

@ -17,6 +17,7 @@ struct NormalWithZST {
y: f32,
z: (),
w: PhantomData<i32>,
v: PhantomPinned,
}
/// cbindgen:rename-all=GeckoCase