Commit graph

77 commits

Author SHA1 Message Date
Richard Feldman
729c849b51
Don't special-case bindgen for single-tag unions 2022-05-29 00:03:30 -04:00
Richard Feldman
1f9040460a
Revert "bindgen TypeAlias for single-tag unions"
This reverts commit 93ec2f8465.
2022-05-28 23:56:00 -04:00
Richard Feldman
93ec2f8465
bindgen TypeAlias for single-tag unions 2022-05-28 23:54:16 -04:00
Richard Feldman
0718a15ae0
Fix gen_rs tests 2022-05-28 23:12:17 -04:00
Richard Feldman
9177ec1344
Drop some obsolete tests
These aren't really adding value now that we have
integration tests for them, and they are arduous
to maintain.
2022-05-24 12:08:09 -04:00
Richard Feldman
c4288869d4
Update gen_rs tests 2022-05-24 12:08:09 -04:00
Richard Feldman
777625be21
Cover all architecture variations in gen_rs tests 2022-05-24 12:08:08 -04:00
Richard Feldman
096b738f1e
Update bindgen to use new formatting 2022-05-22 22:11:36 -04:00
Richard Feldman
6f6b1d8767
Explicitly bindgen size for unions w/o padding 2022-05-20 23:36:56 -04:00
Richard Feldman
da1fd4b195
Remove obsolete & from tests 2022-05-20 23:36:55 -04:00
Richard Feldman
2914260b0e
fix tests 2022-05-20 23:36:55 -04:00
Richard Feldman
39c6feb94c
Dereference ManuallyDrop in Debug instances 2022-05-20 22:03:32 -04:00
Richard Feldman
693a18b235
Update gen_rs tests 2022-05-20 22:03:31 -04:00
Richard Feldman
d1b83258be
Bindgen a debug_assert for into_ and as_ methods 2022-05-19 21:25:28 -04:00
Richard Feldman
5a9149fd84
Bindgen enumeration Debug in a Rust style
e.g. Foo::Bar instead of just Bar
2022-05-19 21:25:27 -04:00
Richard Feldman
1047c5635a
Merge remote-tracking branch 'origin/trunk' into test-bindgen 2022-05-19 14:10:53 -04:00
Richard Feldman
9c72e5e8ed
Remove unnecessary -> () function return types 2022-05-18 08:29:40 -04:00
Richard Feldman
b299b6d8d1
bindgen to I128 and U128 from roc_std in Rust 2022-05-15 22:12:56 -04:00
Richard Feldman
e9439e8a9f
Make generated Rust struct fields pub 2022-05-15 22:12:53 -04:00
Richard Feldman
237c184d33
Reorganize gen_rs tests 2022-05-15 22:12:52 -04:00
Richard Feldman
584a7a7366
Extract bindgen/tests/helpers 2022-05-15 22:12:52 -04:00
Richard Feldman
e10bfe9fa1
Rename MyTagUnion to NonRecursive in examples 2022-05-14 10:25:13 -04:00
Richard Feldman
15c41ccc3a
Use string interpolation over indoc 2022-05-14 01:46:49 -04:00
Richard Feldman
90576a8c38
Make cons list of ints work 2022-05-14 01:15:34 -04:00
Richard Feldman
2d866c6cb6
Add failing test for recursive int cons list 2022-05-14 01:07:18 -04:00
Richard Feldman
e5be25e356
Bindgen a Debug impl for unwrapped pointers 2022-05-14 01:07:17 -04:00
Richard Feldman
170518a6b2
Add nullable unwrapped impls 2022-05-14 00:49:13 -04:00
Richard Feldman
3fa137d19f
Revert "Bindgen single-field record and unions as unwrapped"
This reverts commit 4c2e6471a6.
2022-05-13 23:09:21 -04:00
Richard Feldman
4c2e6471a6
Bindgen single-field record and unions as unwrapped 2022-05-13 23:06:13 -04:00
Richard Feldman
cbd21519f5
Let non-enumeration tag unions derive all but Debug 2022-05-13 22:36:30 -04:00
Richard Feldman
b2b5f8cf93
Improve test for unwrapped nullable tag union bindgen 2022-05-13 21:40:29 -04:00
Richard Feldman
d9cdcb7635
Create nested RocTagUnion enum in bindgen types 2022-05-13 16:39:03 -04:00
Richard Feldman
ed769a7a3b
Simplify bindgen for into_ methods in tag unions
Thanks for the improvement @folkertdev!
2022-05-12 17:03:16 -04:00
Richard Feldman
ce6c7f6024
Fix "Cannot move out of drop" problem for into_Foo 2022-05-12 15:25:52 -04:00
Richard Feldman
49cf2a8483
Bindgen as_Foo and into_Foo for variants 2022-05-12 15:04:24 -04:00
Richard Feldman
1de7d8abb6
Bindgen constructors for no-payload tags 2022-05-12 14:27:17 -04:00
Richard Feldman
e03a44f844
Don't bindgen a variant() accessor 2022-05-12 14:24:43 -04:00
Richard Feldman
2864471f13
Bindgen tag after union, not the other way around 2022-05-12 14:20:56 -04:00
Richard Feldman
749e4b25c7
Bindgen Debug impl for tag unions 2022-05-11 10:47:59 -04:00
Richard Feldman
98e2902088
Bindgen Clone and Copy impls for tag unions 2022-05-11 10:47:59 -04:00
Richard Feldman
60fce86326
Use core over std in bindgen 2022-05-11 10:47:58 -04:00
Richard Feldman
3932300abd
Revise generated tag union code a bit 2022-05-11 10:47:58 -04:00
Richard Feldman
b874e4f7de
Explicitly bindgen enumeration values
This makes it clearer that you can't generate them
and then add your own names wherever you want!
2022-05-11 10:47:58 -04:00
Richard Feldman
55a69c69b0
Enumerations can't derive Default 2022-05-11 10:47:58 -04:00
Richard Feldman
1beb27d6d5
Bindgen PartialOrd and Ord instances for tag unions 2022-05-11 10:47:58 -04:00
Richard Feldman
2fb52af432
Bindgen PartialEq and Eq instances for tag unions 2022-05-11 10:47:58 -04:00
Richard Feldman
00253c6fd9
Don't try to derive impls for tag unions 2022-05-11 10:47:57 -04:00
Richard Feldman
9a22d7632a
Bindgen a Drop implementation for a tag union 2022-05-11 10:47:57 -04:00
Richard Feldman
8d406e681c
Improve the bindgen tag union test a bit 2022-05-11 10:47:57 -04:00
Richard Feldman
3951db9c25
Bindgen constructor functions in tag union impls 2022-05-11 10:47:57 -04:00