about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-18 08:53:00 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-18 09:12:53 +1100
commit472dfe74b32bfa855b70bf8ec59beddbd0514be1 (patch)
tree15c18502fdbf22fdf3a80bda2a8968aaa39ada5c /src/rustllvm/RustWrapper.cpp
parent80a3f453db387d02dcb596745731031e7a8c9048 (diff)
downloadrust-472dfe74b32bfa855b70bf8ec59beddbd0514be1.tar.gz
rust-472dfe74b32bfa855b70bf8ec59beddbd0514be1.zip
Simplify std::num::Primitive trait definition
This removes the `Primitive::{bits, bytes, is_signed}` methods and removes the operator trait constraints, for the reasons outlined below:

- The `Primitive::{bits, bytes}` associated functions were originally added to reflect the existing `BITS` and `BYTES` statics included in the numeric modules. These statics are only exist as a workaround for Rust's lack of CTFE, and should probably be deprecated in the future in favor of using the `std::mem::size_of` function (see #11621).

- `Primitive::is_signed` seems to be of little utility and does not seem to be used anywhere in the Rust compiler or libraries. It is also rather ugly to call due to the `Option<Self>` workaround for #8888.

- The operator trait constraints are already covered by the `Num` trait.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions