summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-24librustc: Remove cross borrowing from mutable `Box`es to `&mut`.Patrick Walton-1/+1
This will break code like: fn f(x: &mut int) {} let mut a = box 1i; f(a); Change it to: fn f(x: &mut int) {} let mut a = box 1i; f(&mut *a); RFC 33; issue #10504. [breaking-change]
2014-06-25auto merge of #15160 : alexcrichton/rust/remove-f128, r=brsonbors-1/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24std: Add stability attributes to primitive numeric modulesBrian Anderson-0/+18
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-06-24Move core::bool tests to run-passBrian Anderson-99/+0
These are closer to language tests than library.
2014-06-24core: Remove bool::to_bitBrian Anderson-24/+1
This is an unused one-liner.
2014-06-24core: Add stability attributes to CloneBrian Anderson-0/+7
The following are tagged 'unstable' - core::clone - Clone - Clone::clone - impl Clone for Arc - impl Clone for arc::Weak - impl Clone for Rc - impl Clone for rc::Weak - impl Clone for Vec - impl Clone for Cell - impl Clone for RefCell - impl Clone for small tuples The following are tagged 'experimental' - Clone::clone_from - may not provide enough utility - impls for various extern "Rust" fns - may not handle lifetimes correctly See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#clone
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-216/+233
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-24Remove the quad_precision_float feature gateAlex Crichton-1/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24auto merge of #14963 : w3ln4/rust/master, r=alexcrichtonbors-0/+2
The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).
2014-06-24Added Mipsel architecture supportPawel Olzacki-0/+2
2014-06-23librustc: Feature gate lang items and intrinsics.Patrick Walton-1/+3
If you define lang items in your crate, add `#[feature(lang_items)]`. If you define intrinsics (`extern "rust-intrinsic"`), add `#[feature(intrinsics)]`. Closes #12858. [breaking-change]
2014-06-22Register new snapshotsAlex Crichton-1/+0
2014-06-20librustc: Put `#[unsafe_destructor]` behind a feature gate.Patrick Walton-1/+2
Closes #8142. This is not the semantics we want long-term. You can continue to use `#[unsafe_destructor]`, but you'll need to add `#![feature(unsafe_destructor)]` to the crate attributes. [breaking-change]
2014-06-19auto merge of #15014 : brson/rust/all-crates-experimental, r=cmrbors-0/+1
This creates a stability baseline for all crates that we distribute that are not `std`. In general, all library code must start as experimental and progress in stages to become stable.
2014-06-18Update doc comment for Int traitBrendan Zabarauskas-1/+2
2014-06-18Shorten endian conversion method namesBrendan Zabarauskas-68/+68
The consensus on #14917 was that the proposed names were too long.
2014-06-18Remove `#[stable]` attribute from free-standing endian conversions and mark ↵Brendan Zabarauskas-12/+12
them as deprecated
2014-06-18Merge the Bitwise and ByteOrder traits into the Int traitBrendan Zabarauskas-345/+318
This reduces the complexity of the trait hierarchy.
2014-06-18Fix comment formattingBrendan Zabarauskas-40/+36
2014-06-18Add a ByteOrder trait for abstracting over endian conversionsBrendan Zabarauskas-167/+263
The `Bitwise::swap_bytes` method was also moved into the `ByteOrder` trait. This was because it works on the byte level rather than the bit level.
2014-06-18rustdoc: Fix testing indented code blocksAlex Crichton-1/+3
The collapse/unindent passes were run in the wrong order, generating different markdown for indented tests.
2014-06-18auto merge of #14992 : nathantypanski/rust/collect-docs, r=huonwbors-14/+22
This updates the documentation for result::collect() and option::collect() to use the new-style syntax for owned pointers and vectors. closes #14991
2014-06-17Mark all crates except std as experimentalBrian Anderson-0/+1
2014-06-17change ~[] -> Vec for collect()Nathan Typanski-14/+22
This updates the documentation for result::collect() and option::collect() to use the new-style syntax for vectors, instead of the old ~[]. Also updates the code blocks for these docs so they will be tested automatically. closes #14991
2014-06-17Add a b"xx" byte string literal of type &'static [u8].Simon Sapin-0/+4
2014-06-15Register new snapshotsAlex Crichton-18/+0
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-1/+3
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-14auto merge of #14866 : bjz/rust/bitwise, r=alexcrichtonbors-20/+152
2014-06-13auto merge of #14750 : bachm/rust/master, r=alexcrichtonbors-0/+8
This adds the missing `get_mut` method to the `MutableVector` trait, and implements it for `&'a mut [T]`.
2014-06-13librustc: Forbid `transmute` from being called on types whose size isPatrick Walton-23/+16
only known post-monomorphization, and report `transmute` errors before the code is generated for that `transmute`. This can break code that looked like: unsafe fn f<T>(x: T) { let y: int = transmute(x); } Change such code to take a type parameter that has the same size as the type being transmuted to. Closes #12898. [breaking-change]
2014-06-13rustc: [T, ..N] and [T, ..N+1] are not the sameAlex Crichton-0/+8
This commit fixes a bug in the calculation of the hash of a type which didn't factor in the length of a constant-sized vector. As a result of this, a type placed into an Any of a fixed length could be peeled out with any other fixed length in a safe manner.
2014-06-13Clarify `Any` docsP1start-4/+6
The `Any` docs previously did not state that only `'static` types implement it.
2014-06-13Add Bitwise::{swap_bytes, rotate_left, rotate_right} methodsBrendan Zabarauskas-20/+152
2014-06-13auto merge of #14831 : alexcrichton/rust/format-intl, r=brsonbors-131/+12
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-13added get_mut() for [T]bachm-0/+8
2014-06-12auto merge of #14811 : forticulous/rust/refcell-show, r=alexcrichtonbors-1/+31
Show impl for RefCell and friends
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-131/+12
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-100/+42
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11auto merge of #14746 : alexcrichton/rust/libsync, r=brsonbors-7/+8
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-11sync: Move underneath libstdAlex Crichton-7/+8
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-3/+4
2014-06-11rustc: Update how Gc<T> is recognizedAlex Crichton-37/+0
This commit uses the same trick as ~/Box to map Gc<T> to @T internally inside the compiler. This moves a number of implementations of traits to the `gc` module in the standard library. This removes functions such as `Gc::new`, `Gc::borrow`, and `Gc::ptr_eq` in favor of the more modern equivalents, `box(GC)`, `Deref`, and pointer equality. The Gc pointer itself should be much more useful now, and subsequent commits will move the compiler away from @T towards Gc<T> [breaking-change]
2014-06-10Show impl for Ref & RefMutfort-1/+31
2014-06-10Fix more misspelled comments and strings.Joseph Crail-2/+2
2014-06-09librustc: Implement overloading for the call operator behind a featurePatrick Walton-0/+21
gate. This is part of unboxed closures.
2014-06-09core: Move the collections traits to libcollectionsAlex Crichton-85/+1
This commit moves Mutable, Map, MutableMap, Set, and MutableSet from `core::collections` to the `collections` crate at the top-level. Additionally, this removes the `deque` module and moves the `Deque` trait to only being available at the top-level of the collections crate. All functionality continues to be reexported through `std::collections`. [breaking-change]
2014-06-08core: Rename `container` mod to `collections`. Closes #12543Brian Anderson-20/+20
Also renames the `Container` trait to `Collection`. [breaking-change]
2014-06-08Fix spelling errors in comments.Joseph Crail-3/+3
2014-06-07Clarify restrictions on neSteven Fackler-2/+4
I can't think of any sane cases where this restriction would not hold, and the standard library seems to assume it pretty much everywhere.