Closed
Description
Currently the following macros are only available from within the context of a function:
-
assert_eq_size
(commit f3da7e4)- Relies on
forget
,transmute
, anduninitialized
as provided bycore::mem
.transmute
anduninitialized
are marked asunsafe
, which makes it unlikely for them to becomeconst
. - Could provide an assertion built on
const_assert
ifmem::size_of
were aconst fn
. To resolve the limitation,const_assert
would need to be resolved first.
- Relies on
-
const_assert
(commit b7ca44e) -
const_assert_eq
(commit b7ca44e)- Dependent on
const_assert
, so resolving that macro would resolve this one.
- Dependent on
Commits b7ca44e and f3da7e4 have somewhat resolved this.
The following macros now require labels (identifiers) unique to their namespace to be used in a non-function context:
-
assert_eq_size
-
assert_obj_safe
-
assert_impl
-
const_assert
-
const_assert_eq
This, along with having more assertions available (#2), would allow for a 1.0.0 release.
Metadata
Metadata
Assignees
Labels
No labels