Age | Commit message (Collapse) | Author |
|
As --use-core is typically given when the wrapped library is to be used
in a no_std environment, format! and String can not be used.
This is a quick fix that will cause regressions in the quality of the
debug output to users that use core but are not no_std, but enables the
use of bindgen with implemented Debug traits to no_std users.
Closes: https://github.com/rust-lang-nursery/rust-bindgen/issues/1100
|
|
Contributes-To: https://github.com/rust-lang-nursery/rust-bindgen/issues/1100
|
|
|
|
rustc fail to compile variadic function with ms_abi:
error[E0045]: variadic function must have C or cdecl calling convention
As suggested in issue, this short term fix: not generate binding
and emit a warning.
Fixes #997
|
|
Map vector types to arrays and pass them by value
This PR maps vector types to arrays and passes them by value (that is, they are passed to C as `[T; N]`. This already allows defining them as a blacklisted opaque type, such that the user can provide its own definition from e.g. `std::arch`.
A subsequent PR should map vector types to unit structs with a private member:
```rust
#[repr(align(16))] pub struct __m128([f32; 4]);
```
to make their alignment at least be correct. This should allow transmuting `std::arch` types to these types properly.
Once that is done, we probably want to detect the canonical vector types (e.g. `__m128`) and pull in the type from `std`/`core`::arch instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
blob() does care about alignment, so we can get into an architecture where there
are integers where size != align.
This is a tentative fix for https://github.com/servo/servo/issues/21093, though
as mentioned there I couldn't find a repro on my machine.
|
|
Fixes #1345
|
|
Followup to #1342
|
|
Fixes #1340
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only when modules are enabled of course.
|
|
|
|
|
|
|
|
Bump quote to 0.5
|
|
optionally use associated constants in bitfields
See #1166
r? @emilio
|
|
|
|
|
|
|
|
This reverts commit eb415c7a7cf8c72664dbfda5a614474cda5c185c.
|
|
Plus fix the check that avoids us generating explicit alignment fields for
structs aligned to more than pointer-size.
Fixes #1291
|
|
Closes #1284
|
|
|
|
|
|
The previous fix for issue #1198 was incomplete.
|
|
Declare precedence on enum types
Fixes issue #1198 where an enum matches the pattern for multiple enum types, such as constified module enum AND rustified enum.
Documents precedence in `Builder` doc comment.
|
|
Otherwise we can't use repr(align) on stylo.
|
|
Fixes #917
|
|
If an enum matched a pattern for rustified enum and constified module
enum, then rust code would fail to compile with "ambiguous associated
type" error. We fix the error by giving constified module enum "higher
precedence".
Fixes issue #1198
|
|
ir: Allow replacing enums and enum variants.
Fixes #1267.
|
|
Use the ? operator instead of try, and add some more uses of it on Option<> that
were straight-forward.
|
|
|
|
This reverts commit 6899c275ee0ab0687ec66c490ddd1a76f8223513.
The `proc_macro2` crate depends on rustc internal crates, which means that
`bindgen` would need to be run under `rustup`.
We can follow https://github.com/rust-lang/rust/issues/47931 to get updates on
when this issue might be resolved and we can update `quote` again.
Fixes #1248
|
|
|
|
codegen: Make forward declarations go through the more generic path.
Instead of special-casing.
This allows to use the normal flags to control what can be or not derived for
them.
Arguably deriving Copy / Clone is kind of busted for those, but changing this by
default broke tests (RefPtr<ForwardDeclaredType> stopped working for example).
So I think this is a good compromise.
Fixes #1238
|
|
ir: Choose the right mangling for destructors on all codepaths.
Fixes #1133.
|
|
Instead of special-casing.
This allows to use the normal flags to control what can be or not derived for
them.
Arguably deriving Copy / Clone is kind of busted for those, but changing this by
default broke tests (RefPtr<ForwardDeclaredType> stopped working for example).
So I think this is a good compromise.
Fixes #1238
|
|
Fixes #1133.
|