about summary refs log tree commit diff
path: root/src/liballoc
AgeCommit message (Collapse)AuthorLines
2015-01-30Use `#[rustc_paren_sugar]` as a more extensible way of deciding whenNiko Matsakis-0/+1
paren sugar is legal.
2015-01-29Auto merge of #21677 - japaric:no-range, r=alexcrichtonbors-10/+6
Note: Do not merge until we get a newer snapshot that includes #21374 There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672). r? @alexcrichton
2015-01-29s/Show/Debug/gJorge Aparicio-2/+2
2015-01-29remove #[old_impl_check] now that #21363 has been fixedJorge Aparicio-4/+0
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-3/+3
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-1/+1
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-29Rollup merge of 21681 - japaric:no-warn, r=alexcrichtonManish Goregaokar-0/+1
2015-01-27fix #[cfg(test)] warningsJorge Aparicio-0/+1
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-236/+186
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-23grandfathered -> rust1Brian Anderson-47/+47
2015-01-23Set unstable feature names appropriatelyBrian Anderson-26/+28
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-22Beef up docs for Box<T>Steve Klabnik-11/+68
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+1
2015-01-21Remove 'since' from unstable attributesBrian Anderson-25/+25
2015-01-21Minor fixesBrian Anderson-2/+0
2015-01-21Tie stability attributes to feature gatesBrian Anderson-3/+1
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-73/+85
2015-01-21Revert "Use assume to inform the optimiser about refcount invariants"Alex Crichton-13/+2
This reverts commit a729a404945de10f99e2530a5c28952996532b29.
2015-01-21Revert "Add assumptions that the pointer is non-null"Alex Crichton-16/+2
This reverts commit 9bbfd681c9fa47f462a89e8f5eedd3fa2a5de2e7.
2015-01-21Revert "Add more explanation for why the assumes are there"Alex Crichton-9/+1
This reverts commit a7525bc4c8eb8507a5c248d29286e77133217cf3.
2015-01-21Test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-21/+31
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21446: stepancheg/boxed-testAlex Crichton-54/+77
Conflicts: src/liballoc/boxed.rs
2015-01-21rollup merge of #21444: petrochenkov/nullAlex Crichton-1/+1
Conflicts: src/libstd/sync/mpsc/select.rs
2015-01-21rollup merge of #21437: FlaPer87/snapshotAlex Crichton-154/+0
r? @alexcrichton
2015-01-21rollup merge of #21418: Aatch/assume-refcountAlex Crichton-4/+37
The reference count can never be 0, unless we're about to drop the data completely. Using the `assume` intrinsic allows us to inform LLVM about that invariant, meaning it can avoid unnecessary drops. --- Before and after IR: https://gist.github.com/Aatch/3786d20df2edaad6a0e8 Generated from the example in #13018 Fixes #13018
2015-01-21rollup merge of #21392: japaric/iterAlex Crichton-0/+17
closes #20953 closes #21361 --- In the future, we will likely derive these `impl`s via syntax extensions or using compiler magic (see #20617). For the time being we can use these manual `impl`s. r? @aturon cc @burntsushi @Kroisse
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-21/+31
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-20also forward Iterator::size_hint()Jorge Aparicio-0/+4
2015-01-20Register snapshot for 9006c3cFlavio Percoco-154/+0
2015-01-20alloc::boxed: enable testStepan Koltsov-53/+77
Previously test was disabled due to `#[cfg(test)]` before `mod boxed`.
2015-01-21Add more explanation for why the assumes are thereJames Miller-1/+9
2015-01-21Add assumptions that the pointer is non-nullJames Miller-2/+16
2015-01-21Rollup merge of #21375 - petrochenkov:ssbsl, r=alexcrichtonBarosl LEE-1/+1
After PR #19766 added implicit coersions `*mut T -> *const T`, the explicit casts can be removed. (The number of such casts turned out to be relatively small).
2015-01-21Use assume to inform the optimiser about refcount invariantsJames Miller-2/+13
The reference count can never be 0, unless we're about to drop the data completely. Using the `assume` intrinsic allows us to inform LLVM about that invariant, meaning it can avoid unnecessary drops.
2015-01-19impl Iterator for &mut Iterator and Box<Iterator>Jorge Aparicio-0/+13
closes #20953 closes #21361
2015-01-19Replace `0 as *const/mut T` with `ptr::null/null_mut()`we-1/+1
2015-01-18std: Stabilize TypeId and tweak BoxAnyAlex Crichton-4/+6
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-17Set allow(unstable) in crates that use unstable featuresBrian Anderson-0/+1
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17Register new snapshots.Eduard Burtescu-16/+0
2015-01-17Remove unnecessary explicit conversions to *const Twe-1/+1
2015-01-16Don't use NoSend/NoSync in liballocFlavio Percoco-0/+160
2015-01-15auto merge of #20980 : richo/rust/final-power, r=alexcrichtonbors-1/+2
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it. This gets you as far as being able to target powerpc with, eg: LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs Would really love to get this out before 1.0. r? @alexcrichton
2015-01-11powerpc: Tell liballoc about power alignmentRicho Healey-1/+2
2015-01-11Rename AtomicInt and AtomicUintSteven Fackler-9/+9
Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize Closes #20893 [breaking-change]
2015-01-08rollup merge of #20754: nikomatsakis/int-featureAlex Crichton-0/+1
Conflicts: src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs src/test/compile-fail/issue-2590.rs src/test/compile-fail/lint-stability.rs src/test/compile-fail/slice-mut-2.rs src/test/compile-fail/std-uncopyable-atomics.rs
2015-01-08Remove warning from the libraries.Huon Wilson-0/+1
This adds the int_uint feature to *every* library, whether or not it needs it.
2015-01-08Improvements to feature stagingBrian Anderson-23/+23
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-07Test fixes and rebase conflictsAlex Crichton-5/+7
2015-01-07rollup merge of #20723: pnkfelix/feature-gate-box-syntaxAlex Crichton-10/+20
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/libserialize/lib.rs src/libsyntax/feature_gate.rs