]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #76492 - fusion-engineering-forks:int-bits, r=dtolnay
authorRalf Jung <post@ralfj.de>
Sat, 19 Sep 2020 09:47:45 +0000 (11:47 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Sep 2020 09:47:45 +0000 (11:47 +0200)
Add associated constant `BITS` to all integer types

Recently I've regularly come across this snippet (in a few different crates, including `core` and `std`):
```rust
std::mem::size_of<usize>() * 8
```

I think it's time for a `usize::BITS`.


Trivial merge