diff options
| author | Trevor Spiteri <tspiteri@ieee.org> | 2020-02-22 14:03:46 +0100 |
|---|---|---|
| committer | Trevor Spiteri <tspiteri@ieee.org> | 2020-02-22 14:03:46 +0100 |
| commit | d15a98b87815850ef9dd11564e896b6f19b724c3 (patch) | |
| tree | c99c374a6aee399b457c0f69b74ee79e8e2ffde3 /src/test/ui/thinlto | |
| parent | 03d2f5cd6c634b1fdcd26b036009aa4dce37fdfc (diff) | |
| download | rust-d15a98b87815850ef9dd11564e896b6f19b724c3.tar.gz rust-d15a98b87815850ef9dd11564e896b6f19b724c3.zip | |
Stabilize const for integer {to,from}_{be,le,ne}_bytes methods
All of these functions can be implemented simply and naturally as
const functions, e.g. u32::from_le_bytes can be implemented as
(bytes[0] as u32)
| (bytes[1] as u32) << 8
| (bytes[2] as u32) << 16
| (bytes[3] as u32) << 24
So stabilizing the constness will not expose that internally they are
implemented using transmute which is not const in stable.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
