Use ptr::metadata in <[T]>::len implementation This avoids duplication of ptr::metadata code. I believe this is acceptable as the previous approach essentially duplicated `ptr::metadata` because back then `rustc_allow_const_fn_unstable` annotation did not exist. I would like somebody to ping `@rust-lang/wg-const-eval` as the documentation says: > Always ping `@rust-lang/wg-const-eval` if you are adding more rustc_allow_const_fn_unstable attributes to any const fn. |
||
---|---|---|
.. | ||
alloc | ||
array | ||
async_iter | ||
cell | ||
char | ||
convert | ||
ffi | ||
fmt | ||
future | ||
hash | ||
iter | ||
macros | ||
mem | ||
num | ||
ops | ||
panic | ||
prelude | ||
ptr | ||
slice | ||
str | ||
sync | ||
task | ||
unicode | ||
any.rs | ||
ascii.rs | ||
asserting.rs | ||
bool.rs | ||
borrow.rs | ||
cell.rs | ||
clone.rs | ||
cmp.rs | ||
const_closure.rs | ||
default.rs | ||
error.md | ||
error.rs | ||
hint.rs | ||
internal_macros.rs | ||
intrinsics.rs | ||
lib.rs | ||
marker.rs | ||
option.rs | ||
panic.rs | ||
panicking.rs | ||
pin.rs | ||
primitive_docs.rs | ||
primitive.rs | ||
result.rs | ||
time.rs | ||
tuple.rs | ||
unit.rs |