about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-18 05:36:47 -0800
committerbors <bors@rust-lang.org>2014-01-18 05:36:47 -0800
commit2952685917cb17a3d849cb02d17ce71ccecfb855 (patch)
treecbd9d41eab2707b91ad0f24765d4a2a6e6935370 /src/rustllvm/RustWrapper.cpp
parentfb40bdbb6295a989806e7c3dcc23631becdb702f (diff)
parentf125b71c0081acebbfcdd60bfe517d7e4dd388d4 (diff)
downloadrust-2952685917cb17a3d849cb02d17ce71ccecfb855.tar.gz
rust-2952685917cb17a3d849cb02d17ce71ccecfb855.zip
auto merge of #11622 : bjz/rust/simplify-primitive-trait, r=brson
As part of #10387, this removes the `Primitive::{bits, bytes, is_signed}` methods and removes the trait's 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 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