about summary refs log tree commit diff
path: root/src/libstd/num/uint.rs
AgeCommit message (Collapse)AuthorLines
2015-02-20make int/uint modules just re-exportsAlexis-22/+0
2015-01-23Deprecated attributes don't take 'feature' names and are paired with ↵Brian Anderson-1/+2
stable/unstable Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-1/+1
2015-01-07Add isize, usize modules, deprecate int, uint modulesAaron Turon-3/+6
This PR introduces `isize` and `usize` modules to `core` and `std`, and deprecates the existing `int` and `uint` modules. The rustdoc primitive type links now point to these new modules. Due to deprecation this is a: [breaking-change]
2015-01-03Remove deprecated functionalityAlex Crichton-2/+0
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2014-12-19Stabilize integer modulesAaron Turon-1/+1
This small patch stabilizes the names of all integer modules (including `int` and `uint`) and the `MIN` and `MAX` constants. The `BITS` and `BYTES` constants are left unstable for now.
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-1/+1
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-13libstd: use unboxed closuresJorge Aparicio-0/+2
2014-11-16Move FromStr to core::strBrendan Zabarauskas-5/+0
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-2/+1
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-1/+0
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-0/+1
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-1/+0
2014-08-13std: Rename various slice traits for consistencyBrian Anderson-1/+1
ImmutableVector -> ImmutableSlice ImmutableEqVector -> ImmutableEqSlice ImmutableOrdVector -> ImmutableOrdSlice MutableVector -> MutableSlice MutableVectorAllocating -> MutableSliceAllocating MutableCloneableVector -> MutableCloneableSlice MutableOrdVector -> MutableOrdSlice These are all in the prelude so most code will not break. [breaking-change]
2014-06-24std: Add stability attributes to primitive numeric modulesBrian Anderson-0/+1
The following are unstable: - core::int, i8, i16, i32, i64 - core::uint, u8, u16, u32, u64 - core::int::{BITS, BYTES, MIN, MAX}, etc. - std::int, i8, i16, i32, i64 - std::uint, u8, u16, u32, u64 The following are experimental: - std::from_str::FromStr and impls - may need to return Result instead of Option - std::int::parse_bytes, etc. - ditto - std::num::FromStrRadix and impls - ditto - std::num::from_str_radix - ditto The following are deprecated: - std::num::ToStrRadix and imples - Wrapper around fmt::radix. Wrong name (Str vs String) See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#uint
2014-05-31rustdoc: Create anchor pages for primitive typesAlex Crichton-0/+2
This commit adds support in rustdoc to recognize the `#[doc(primitive = "foo")]` attribute. This attribute indicates that the current module is the "owner" of the primitive type `foo`. For rustdoc, this means that the doc-comment for the module is the doc-comment for the primitive type, plus a signal to all downstream crates that hyperlinks for primitive types will be directed at the crate containing the `#[doc]` directive. Additionally, rustdoc will favor crates closest to the one being documented which "implements the primitive type". For example, documentation of libcore links to libcore for primitive types, but documentation for libstd and beyond all links to libstd for primitive types. This change involves no compiler modifications, it is purely a rustdoc change. The landing pages for the primitive types primarily serve to show a list of implemented traits for the primitive type itself. The primitive types documented includes both strings and slices in a semi-ad-hoc way, but in a way that should provide at least somewhat meaningful documentation. Closes #14474
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-0/+1
2014-05-15std: Delegate some integer formatting to core::fmtAlex Crichton-1/+0
In an attempt to phase out the std::num::strconv module's string formatting functionality, this commit reimplements some provided methods for formatting integers on top of format!() instead of the custom (and slower) implementation inside of num::strconv. Primarily, this deprecates int_to_str_bytes_common
2014-05-08Handle breakage after libcore splitKevin Ballard-2/+1
API Changes: - &[T] and ~[T] no longer support the addition operator (+)
2014-05-07core: Inherit the specific numeric modulesAlex Crichton-77/+6
This implements all traits inside of core::num for all the primitive types, removing all the functionality from libstd. The std modules reexport all of the necessary items from the core modules.
2014-05-03Add lint check for negating uint literals and variables.Falco Hirschenberger-0/+1
See #11273 and #13318
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-02-24Remove std::from_str::FromStr from the preludeBrendan Zabarauskas-0/+1
2014-02-23std: Move intrinsics to std::intrinsics.Brian Anderson-1/+1
Issue #1457
2014-02-01Move int and uint overflow tests into macrosBrendan Zabarauskas-8/+0
2014-02-01Remove free-standing div functions in std::uintBrendan Zabarauskas-60/+0
2014-02-01Make next_power_of_two generic for unsigned integersBrendan Zabarauskas-65/+0
Also rename `next_power_of_two_opt` to `checked_next_power_of_two`.
2014-01-30Remove Times traitBrendan Zabarauskas-31/+0
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-25Uppercase numeric constantsChris Wong-5/+5
The following are renamed: * `min_value` => `MIN` * `max_value` => `MAX` * `bits` => `BITS` * `bytes` => `BYTES` Fixes #10010.
2014-01-16Merge Bitwise and BitCount traits and remove from prelude, along with BoundedBrendan Zabarauskas-1/+1
One less trait in std::num, and three less exported in the prelude.
2013-12-27std: uniform modules titles for docLuca Bruno-1/+1
This commit uniforms the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index. Signed-off-by: Luca Bruno <lucab@debian.org>
2013-11-29Removed module macro workaround for signed and unsigned integersMarvin Löbel-4/+11
2013-11-26libstd: Fix Win32 and other bustage.Patrick Walton-2/+2
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-1/+1
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-1/+1
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-3/+3
2013-09-16std::num: Add uint::next_power_of_two_optblake2-ppc-1/+11
Like next_power_of_two, but returns None on overflow.
2013-09-08Moved checked trait impls out of std::numBrendan Zabarauskas-0/+69
This follows the same pattern as the other numeric trait impls, and reduces the clutter in std::num.
2013-08-29Remove the iter module.Jason Fager-3/+3
Moves the Times trait to num while the question of whether it should exist at all gets hashed out as a completely separate question.
2013-08-06std: Remove uint::iterate, replaced by `range`blake2-ppc-24/+0
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-7/+6
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-2/+2
2013-05-24Remove usage of the #[merge] hack with int modulesAlex Crichton-0/+195