Commit graph

73 commits

Author SHA1 Message Date
Simon Hausmann
b9bcf01019 Exclude const-field-offset from the license check
This is in fact a third-party crate slightly forked
2020-08-18 13:59:31 +02:00
Simon Hausmann
7f1d9f5252 Commit correct license tags to Cargo.toml
For now that's GPL-3.0 only, but this can be changed :-)
2020-08-18 10:12:59 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
c7827c9dd5 Add support for Drop when using #[pin] with const_field_offset
A new attribute implements the Drop mechanics outlined in the Pin
documentation without requiring the use of unsafe on the caller side,
by means of an intermediate PinnedDrop trait.
2020-08-14 13:44:53 +02:00
Olivier Goffart
0a56912d0f Mouse grab in rust 2020-08-07 16:06:49 +02:00
Olivier Goffart
1bfd708784 Change the field_offsets() function to a FIELD_OFFSETS associated const 2020-08-03 16:04:55 +02:00
Simon Hausmann
9d9779ecde Fix linter warning
When docs are required, don't require them for the generated field offset module.
2020-07-07 14:14:17 +02:00
Olivier Goffart
40f4265071 Some improvement in ConstFieldOffset trait 2020-06-25 18:23:08 +02:00
Olivier Goffart
812b08b50c const_field_offset: Add compile type type for the offset
WIP
2020-06-25 17:46:29 +02:00
Olivier Goffart
f50a705e00 Add the #[pin] attribute to be able to project to the pinned item 2020-06-25 12:18:09 +02:00
Olivier Goffart
9ed660926c Added a #[pin] attribute in the FieldOffsets macro 2020-06-25 12:18:09 +02:00
Olivier Goffart
23e9397578 Add a Pinned flag to FieldOffset
So we can have Pinned projection
2020-06-25 12:18:09 +02:00
Olivier Goffart
d4e68971ef Make FieldOffset contra-variant in U 2020-06-24 18:53:53 +02:00
Olivier Goffart
4960cee542 const-field-offset: some documentation fixup 2020-06-24 18:20:14 +02:00
Olivier Goffart
b6705c6c69 const_field_offset: ensure that the structure is not repr(packed) 2020-06-24 18:20:14 +02:00
Olivier Goffart
f74c801b59 Fix a bunch of warning in the generated rust 2020-06-17 10:26:20 +02:00
Olivier Goffart
064db5aa5b const-field-offset: Add a way to specify the crate name 2020-06-16 13:47:02 +02:00
Olivier Goffart
34931e58c0 Polishing of the documentation 2020-06-08 17:57:18 +02:00
Olivier Goffart
68cea2aeec Fix soundness hole in FieldOffset
This was cause by the change to allow to create FieldOffset in const constext
because a Fn(T)->U  is not allowed in a const constext.
But we need to be contravariant in T.
2020-05-18 11:06:44 +02:00
Olivier Goffart
751a3fbe59 Work on const field offset crate to give type safe offsets 2020-05-18 11:06:44 +02:00
Olivier Goffart
7d1394e349 Add a viewer tool 2020-05-12 19:19:25 +02:00
Olivier Goffart
ecf1599d35 Silent warnings 2020-05-07 08:20:44 +02:00
Olivier Goffart
a0d9369336 Add a crate to compute the field offsets as const fn 2020-05-06 20:58:10 +02:00