Ignore PhantomPinned
cbindgen already ignores `PhantomData`. It should ignore `PhantomPinned` for the same reasons. Closes #695 Fixes #694
This commit is contained in:
parent
2d20c4b151
commit
4e394493d6
1
docs.md
1
docs.md
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user