google / google/zerocopy

`transmute_ref` doc example fails to compile as-written

Open
#2,970 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.6k
Forks
179
Avg merge
1d 19h
Merged PRs (30d)
29

Description

This hidden type alias in the doctest for `transmute_ref!`
```
/// # type u16 = zerocopy::byteorder::native_endian::U16;
/// # type u32 = zerocopy::byteorder::native_endian::U32;
```
exceeds the threshold of sensible cleverness by suggesting that `transmute_ref` somehow bypasses the usual shortcomings of alignedness and `IntoBytes`. Whatever example is used here should *basically* compile as-written.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.