about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2014-12-16std: Change escape_unicode to use new escapesAlex Crichton-75/+68
This changes the `escape_unicode` method on a `char` to use the new style of unicode escapes in the language. Closes #19811 Closes #19879
2014-12-16auto merge of #19777 : nikomatsakis/rust/warn-on-shadowing, r=acrichtobors-9/+9
per rfc 459 cc https://github.com/rust-lang/rust/issues/19390 One question is: should we start by warning, and only switch to hard error later? I think we discussed something like this in the meeting. r? @alexcrichton
2014-12-15Move hash module from collections to coreSteven Fackler-2/+791
2014-12-15std: Second pass stabilization of `default`Alex Crichton-3/+14
This commit performs a second pass stabilization of the `std::default` module. The module was already marked `#[stable]`, and the inheritance of `#[stable]` was removed since this attribute was applied. This commit adds the `#[stable]` attribute to the trait definition and one method name, along with all implementations found in the standard distribution.
2014-12-15std: Second-pass stabilization of `mem`Alex Crichton-3/+11
This commit takes a second pass through the `std::mem` module for stabilization. The only remaining non-stable items in this module were `forget`, `transmute`, `copy_lifetime`, and `copy_lifetime_mut`. The `forget` and `transmute` intrinsics themselves were marked `#[stable]` to propgate into the `core::mem` module so they would be marked stable. The `copy_lifetime` functions were left `unstable`, but `Sized?` annotations were added to the parameters to allow more general use with DSTs. The `size_of_val`, `min_align_of_val`, and `align_of_val` functions would like to grow `Sized?` bounds, but this is a backwards compatible change that currently ICEs the compiler, so this change was not made at this time. Finally, the module itself was declared `#![stable]` in this pass.
2014-12-16auto merge of #19747 : alexcrichton/rust/slice-one-trait, r=brsonbors-431/+34
This commit collapses the various prelude traits for slices into just one trait: * SlicePrelude/SliceAllocPrelude => SliceExt * CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt * OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt * PartialEqSlicePrelude => PartialEqSliceExt
2014-12-15auto merge of #19448 : japaric/rust/binops-by-value, r=nikomatsakisbors-5/+442
- The following operator traits now take their arguments by value: `Add`, `Sub`, `Mul`, `Div`, `Rem`, `BitAnd`, `BitOr`, `BitXor`, `Shl`, `Shr`. This breaks all existing implementations of these traits. - The binary operation `a OP b` now "desugars" to `OpTrait::op_method(a, b)` and consumes both arguments. - `String` and `Vec` addition have been changed to reuse the LHS owned value, and to avoid internal cloning. Only the following asymmetric operations are available: `String + &str` and `Vec<T> + &[T]`, which are now a short-hand for the "append" operation. [breaking-change] --- This passes `make check` locally. I haven't touch the unary operators in this PR, but converting them to by value should be very similar to this PR. I can work on them after this gets the thumbs up. @nikomatsakis r? the compiler changes @aturon r? the library changes. I think the only controversial bit is the semantic change of the `Vec`/`String` `Add` implementation. cc #19148
2014-12-15Remove internal uses of `marker::NoCopy`Jorge Aparicio-19/+9
2014-12-15Remove all shadowed lifetimes.Niko Matsakis-9/+9
2014-12-15rollup merge of #19779: Noctune/masterBrian Anderson-11/+25
The old PartialOrd impl for raw pointers would always return Some(_), so It might as well implement Ord too.
2014-12-15rollup merge of #19710: steveklabnik/gh15449Brian Anderson-3/+3
Fixes #15499.
2014-12-15Standardize some usages of "which" in docstringsAndrew Wagner-26/+26
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.
2014-12-14impl `Copy` for `NoSend`/`NoSync`Jorge Aparicio-4/+2
2014-12-14std: Collapse SlicePrelude traitsAlex Crichton-431/+34
This commit collapses the various prelude traits for slices into just one trait: * SlicePrelude/SliceAllocPrelude => SliceExt * CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt * OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt * PartialEqSlicePrelude => PartialEqSliceExt
2014-12-14std: Fully stabilize Option<T>Alex Crichton-26/+87
This commit takes a second pass through the `std::option` module to fully stabilize any lingering methods inside of it. These items were made stable as-is * Some * None * as_mut * expect * unwrap * unwrap_or * unwrap_or_else * map * map_or * map_or_else * and_then * or_else * unwrap_or_default * Default implementation * FromIterator implementation * Copy implementation These items were made stable with modifications * iter - now returns a struct called Iter * iter_mut - now returns a struct called IterMut * into_iter - now returns a struct called IntoIter, Clone is never implemented This is a breaking change due to the modifications to the names of the iterator types returned. Code referencing the old names should updated to referencing the newer names instead. This is also a breaking change due to the fact that `IntoIter` no longer implements the `Clone` trait. These items were explicitly not stabilized * as_slice - waiting on indexing conventions * as_mut_slice - waiting on conventions with as_slice as well * cloned - the API was still just recently added * ok_or - API remains experimental * ok_or_else - API remains experimental [breaking-change]
2014-12-14libcore: make iterator adaptors `Clone`ableJorge Aparicio-0/+135
2014-12-14InvariantLifetime is Copy-ableJake Goulding-0/+2
Both ContravariantLifetime and CovariantLifetime are marked as Copy, so it makes sense for InvariantLifetime to be as well.
2014-12-14Add LLVM's unordered intrinsic to Rust.Joshua Yanovski-0/+2
2014-12-14Remove `proc` types/expressions from the parser, compiler, andNiko Matsakis-9/+0
language. Recommend `move||` instead.
2014-12-14Fix mispelling in char.rs error messagemchaput-1/+1
Error message has wrong spelling ("radix is to high").
2014-12-13libcore: fix doctestsJorge Aparicio-22/+22
2014-12-13libcore: fix move semantics falloutJorge Aparicio-3/+3
2014-12-13libcore: convert binop traits to by valueJorge Aparicio-0/+437
2014-12-13libcore: allow deprecated `valN` methods on doc testsJorge Aparicio-0/+3
2014-12-13Deprecate the `TupleN` traitsJorge Aparicio-106/+109
2014-12-13libcore: use unboxed closures in `slice::raw` free functionsJorge Aparicio-8/+7
2014-12-13libcore: use unboxed closures in `float_to_str_bytes_common`Jorge Aparicio-3/+6
2014-12-13libcore: use unboxed closures in the `char` moduleJorge Aparicio-2/+3
2014-12-13libcore: use unboxed closures in `Formatter` methodsJorge Aparicio-5/+4
2014-12-13libcore: fix fallout in doc testsJorge Aparicio-1/+5
2014-12-13libcore: use unboxed closures in the `finally` moduleJorge Aparicio-23/+12
2014-12-13libcore: use unboxed closures in `SlicePrelude` methodsJorge Aparicio-2/+2
2014-12-13libcore: use unboxed closures in the fields of `MutSplits`Jorge Aparicio-11/+20
2014-12-13libcore: use unboxed closures in the fields of `Splits`Jorge Aparicio-12/+19
2014-12-13libcore: fix fallout in doctestsJorge Aparicio-9/+45
2014-12-13libcore: impl CharEq for FnMut(char) -> bool implementorsJorge Aparicio-13/+6
2014-12-13libcore: use unboxed closures in `ExactSizeIterator` methodsJorge Aparicio-1/+1
2014-12-13libcore: use unboxed closures in `IteratorExt` methodsJorge Aparicio-7/+7
2014-12-13libcore: use unboxed closures in the fields of `Unfold`Jorge Aparicio-11/+18
2014-12-13libcore: use unboxed closures in the fields of `Inspect`Jorge Aparicio-11/+18
2014-12-13libcore: use unboxed closures in the fields of `FlatMap`Jorge Aparicio-10/+17
2014-12-13libcore: use unboxed closures in the fields of `Scan`Jorge Aparicio-6/+10
2014-12-13libcore: use unboxed closures in the fields of `TakeWhile`Jorge Aparicio-5/+5
2014-12-13libcore: use unboxed closures in the fields of `SkipWhile`Jorge Aparicio-5/+5
2014-12-13libcore: use unboxed closures in the fields of `FilterMap`Jorge Aparicio-7/+12
2014-12-13libcore: use unboxed closures in the fields of `Filter`Jorge Aparicio-6/+9
2014-12-13libcore: use unboxed closures in the fields of `Map`Jorge Aparicio-17/+28
2014-12-13libcore: use unboxed closures in `Result` methodsJorge Aparicio-6/+8
2014-12-13libcore: use unboxed closures in `Option` methodsJorge Aparicio-8/+8
2014-12-12Switch to using predicates to drive checking. Correct various tests --Niko Matsakis-1/+1
in most cases, just the error message changed, but in some cases we are reporting new errors that OUGHT to have been reported before but we're overlooked (mostly involving the `'static` bound on `Send`).