David Tolnay
fabca77bf8
Move type alias trivial asserts to section
2020-10-03 21:25:41 -07:00
David Tolnay
4cefa728e0
Consistently use ety for extern type variables
2020-10-03 21:24:07 -07:00
David Tolnay
599fad85bf
Debug impl for OrderedSet
2020-10-03 21:21:32 -07:00
David Tolnay
44198dd15a
Merge pull request #335 from dtolnay/kind
...
Add dedicated error message referring to cxx::ExternType when opaque type is used by value
2020-10-03 21:19:37 -07:00
David Tolnay
3208fd7a58
Provide more helpful error when opaque C++ type used by value
2020-10-03 21:10:05 -07:00
David Tolnay
b5aca7b8a7
Collect reason that each alias is required trivial
2020-10-03 21:10:02 -07:00
David Tolnay
11fd6d0f1b
An unordered set suffices for required_trivial_aliases
2020-10-03 21:09:23 -07:00
David Tolnay
373d70457a
Merge pull request #334 from dtolnay/kind
...
Touch up PR 325
2020-10-03 21:09:11 -07:00
David Tolnay
7426cc1c33
Wrap the trivial type static assertions
2020-10-03 21:07:57 -07:00
David Tolnay
89e386d115
Atom cannot be in required_trivial_aliases
2020-10-03 21:07:48 -07:00
David Tolnay
163564c305
Simplify scan for required trivial aliases using a closure
2020-10-03 21:02:27 -07:00
David Tolnay
63a0e4ee03
Combine Kind verification into expand_type_alias_verify
2020-10-03 21:02:27 -07:00
David Tolnay
445dcc6a33
Merge pull request #333 from dtolnay/kind
...
Update documentation and API of Trivial and Opaque kind markers
2020-10-03 21:02:17 -07:00
David Tolnay
38670b9a70
Seal the Kind trait
...
This trait is not intended to be implementable outside of the cxx crate,
and by sealing we retain the ability to add methods or associated items
into the trait in the future without a breaking change.
2020-10-03 20:54:14 -07:00
David Tolnay
43232b9eff
Add trait bound to ExternType::Kind
2020-10-03 20:54:14 -07:00
David Tolnay
61ca18da6f
Make kind::Opaque and kind::Trivial impossible to instantiate
...
These marker types are never intended to exist at runtime, only at
compile time in a trait impl.
2020-10-03 20:54:14 -07:00
David Tolnay
73e0582300
Update documentation of ExternType::Kind
2020-10-03 20:54:14 -07:00
David Tolnay
0d161d2c18
Show only the associated type being discussed
2020-10-03 20:54:14 -07:00
David Tolnay
4e8c7b9fc6
Move overview of extern type kinds to the Kind associated type
2020-10-03 20:54:14 -07:00
David Tolnay
978401978a
Update documentation of Opaque and Trivial markers
2020-10-03 20:54:14 -07:00
David Tolnay
1bd502d893
Add documentation of cxx::kind module
2020-10-03 20:54:13 -07:00
David Tolnay
38f5ad69da
Move Opaque and Trivial marker types under a ::kind module
...
In the interest of keeping the root module focused on the most widely
used items only.
2020-10-03 20:54:13 -07:00
David Tolnay
9f69230783
Merge pull request #325 from adetaylor/with-trivial-2
...
Allow type aliases to be marked as Trivial.
2020-10-03 20:53:30 -07:00
David Tolnay
4954ca171f
Merge pull request #332 from dtolnay/doc
...
Preserve docs on aliases
2020-10-03 16:38:22 -07:00
Bryan Henry
890083d64f
Preserve docs on aliases
2020-10-02 11:36:33 -07:00
Adrian Taylor
feb0dc104c
Fix expected error messages.
2020-09-30 16:51:31 -07:00
Adrian Taylor
d7f5bb902b
Documenting ExternType::Kind.
2020-09-30 16:38:06 -07:00
Adrian Taylor
405e8740a4
Add C++ checks for triviality of Trivial types.
2020-09-30 16:38:06 -07:00
Adrian Taylor
c704329d3b
Allow aliases and C++ opaque types to be trivial.
...
This change allows aliases:
type Foo = bindgen::Bar;
and C++ opaque types:
type Foo;
to declare that they're 'trivial' in the sense that:
* They have trivial move constructors
* They have no destructors
and therefore may be passed and owned by value in Rust.
A subsequent commit will add C++ static assertions.
This commit is a BREAKING CHANGE as it requires existing
ExternTypes to gain a new associated type
2020-09-30 16:38:06 -07:00
David Tolnay
f2fbac79ab
Merge pull request #328 from dtolnay/buck
...
Combine buck codegen steps into one run of cxxbridge
2020-09-27 17:47:55 -04:00
David Tolnay
0489527aec
Combine buck codegen steps into one run of cxxbridge
2020-09-27 17:41:42 -04:00
David Tolnay
d1ca05aa1c
Implement buck genrule using -o instead of redirection
2020-09-27 17:41:08 -04:00
David Tolnay
61dbb45c48
Merge pull request #327 from dtolnay/bazel
...
Combine bazel codegen steps into one run of cxxbridge
2020-09-27 17:39:14 -04:00
David Tolnay
8b7878ccff
Combine bazel codegen steps into one run of cxxbridge
2020-09-27 17:16:36 -04:00
David Tolnay
f0bd14d97f
Merge pull request #326 from dtolnay/run_binary
...
Switch Bazel rules from genrule to run_binary
2020-09-25 20:39:42 -04:00
David Tolnay
73d129dfd9
Wrap run_binary args
2020-09-25 20:26:25 -04:00
David Tolnay
5a3ddf1f0e
Switch from genrule to run_binary for Bazel
2020-09-25 20:26:14 -04:00
David Tolnay
e53ec04397
Bypass compiletest on Windows push and pull_request builds
2020-09-24 23:36:00 -04:00
David Tolnay
acc7fb05f9
Simpler expression for making an empty slice
2020-09-24 18:10:09 -04:00
David Tolnay
b312bb15e3
Release 0.4.7
0.4.7
2020-09-24 16:17:02 -04:00
David Tolnay
4cbd8f4e13
Merge pull request #322 from dtolnay/as_slice
...
Add API to get slice from CxxVector
2020-09-24 16:13:27 -04:00
David Tolnay
80631e93ef
Add test involving empty vector
2020-09-24 16:07:30 -04:00
David Tolnay
a5a14ce158
Add explanation of as_slice implementation
2020-09-24 16:02:40 -04:00
David Tolnay
5df0a71dcf
Add test for CxxVector::as_slice
2020-09-24 15:58:58 -04:00
David Tolnay
93637cac19
Add CxxVector::as_slice -> &[T]
2020-09-24 15:58:58 -04:00
David Tolnay
950fb211a8
Merge pull request #319 from dtolnay/multiple
...
Handle multiple outputs from the same cxxbridge invocation
2020-09-24 11:46:40 -04:00
David Tolnay
f027756ba7
Handle multiple outputs from the same cxxbridge invocation
2020-09-24 11:38:22 -04:00
David Tolnay
13213b7a85
Simplify parsing of include flags
2020-09-24 10:51:27 -04:00
David Tolnay
6427614d94
Move arg parsing out of big struct literal
2020-09-24 10:51:27 -04:00
David Tolnay
a5cd6c8133
Merge pull request #318 from dtolnay/_h
...
Assume header output for paths ending in .h
2020-09-24 10:51:16 -04:00