about summary refs log tree commit diff
path: root/src/libstd/rt
AgeCommit message (Collapse)AuthorLines
2015-01-30std: Stabilize FromStr and parseAlex Crichton-2/+2
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
2015-01-30lint: Add test for no_mangleRicho Healey-7/+3
2015-01-29rt: allow unexported functionsRicho Healey-0/+9
rust_panic is unexported, however the metadata exported will usually include it for attaching breakpoints.
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-1/+1
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-2/+2
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-23Set unstable feature names appropriatelyBrian Anderson-2/+2
* `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-22Rollup merge of #21325 - nagisa:thread-panicking, r=steveklabnikSteve Klabnik-1/+1
Previous wording wasn’t clear about its actual behaviour. It could be interpreted as answering either: * Can current thread panic? * Is current thread unwinding because of panic? r? @steveklabnik
2015-01-21Remove 'since' from unstable attributesBrian Anderson-2/+2
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-2/+2
2015-01-21Fallout from stabilization.Aaron Turon-1/+1
2015-01-17Refine wording of Thread::panickingSimonas Kazlauskas-1/+1
Previous wording wasn’t clear about its actual behaviour. It could be interpreted as answering either: * Can current thread panic? * Is current thread unwinding because of panic?
2015-01-15auto merge of #20980 : richo/rust/final-power, r=alexcrichtonbors-0/+3
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-14auto merge of #21061 : japaric/rust/range, r=nick29581bors-3/+3
2015-01-13auto merge of #20944 : brson/rust/weve-met-with-a-terrible-fate-havent-we, ↵bors-50/+0
r=brson Closes #13871
2015-01-12cleanup: `&foo[0..a]` -> `&foo[..a]`Jorge Aparicio-3/+3
2015-01-11powerpc: Add unwinder size REVISITRicho Healey-0/+3
2015-01-11Rename AtomicInt and AtomicUintSteven Fackler-12/+12
Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize Closes #20893 [breaking-change]
2015-01-11std: Remove fortune cookies from fatal runtime errorsBrian Anderson-50/+0
Closes #13871
2015-01-08Improvements to feature stagingBrian Anderson-2/+2
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-07use slicing sugarJorge Aparicio-3/+3
2015-01-06rollup merge of #20563: cmr/macro-input-future-proofingAlex Crichton-4/+12
2015-01-06Minor fallout/update FOLLOW setsCorey Richardson-4/+12
2015-01-06rollup merge of #20607: nrc/kindsAlex Crichton-1/+1
Conflicts: src/libcore/array.rs src/libcore/cell.rs src/libcore/prelude.rs src/libstd/path/posix.rs src/libstd/prelude/v1.rs src/test/compile-fail/dst-sized-trait-param.rs
2015-01-06Register new snapshotsAlex Crichton-2/+1
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-07markers -> markerNick Cameron-1/+1
2015-01-07Replace full slice notation with index callsNick Cameron-3/+3
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-1/+1
[breaking-change]
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-2/+2
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05Rename macro_escape to macro_useKeegan McAllister-0/+2
In the future we want to support #[macro_use(foo, bar)] mod macros; but it's not an essential part of macro reform. Reserve the syntax for now.
2015-01-05Stop using macro_escape as an inner attributeKeegan McAllister-2/+0
In preparation for the rename.
2015-01-05std: Redesign c_str and c_vecAlex Crichton-10/+7
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-03Remove deprecated functionalityAlex Crichton-12/+12
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.
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-2/+2
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-2/+2
2015-01-03Initial version of AArch64 support.Akos Kiss-1/+4
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2015-01-02rollup merge of #20315: alexcrichton/std-syncAlex Crichton-685/+12
Conflicts: src/libstd/rt/exclusive.rs src/libstd/sync/barrier.rs src/libstd/sys/unix/pipe.rs src/test/bench/shootout-binarytrees.rs src/test/bench/shootout-fannkuch-redux.rs
2015-01-02rollup merge of #20377: alexcrichton/issue-20352Alex Crichton-21/+16
2015-01-02std: Stabilize the prelude moduleAlex Crichton-16/+16
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2015-01-01std: Enforce Unicode in fmt::WriterAlex Crichton-21/+16
This commit is an implementation of [RFC 526][rfc] which is a change to alter the definition of the old `fmt::FormatWriter`. The new trait, renamed to `Writer`, now only exposes one method `write_str` in order to guarantee that all implementations of the formatting traits can only produce valid Unicode. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md One of the primary improvements of this patch is the performance of the `.to_string()` method by avoiding an almost-always redundant UTF-8 check. This is a breaking change due to the renaming of the trait as well as the loss of the `write` method, but migration paths should be relatively easy: * All usage of `write` should move to `write_str`. If truly binary data was being written in an implementation of `Show`, then it will need to use a different trait or an altogether different code path. * All usage of `write!` should continue to work as-is with no modifications. * All usage of `Show` where implementations just delegate to another should continue to work as-is. [breaking-change] Closes #20352
2015-01-01std: Second pass stabilization of syncAlex Crichton-131/+12
This pass performs a second pass of stabilization through the `std::sync` module, avoiding modules/types that are being handled in other PRs (e.g. mutexes, rwlocks, condvars, and channels). The following items are now stable * `sync::atomic` * `sync::atomic::ATOMIC_BOOL_INIT` (was `INIT_ATOMIC_BOOL`) * `sync::atomic::ATOMIC_INT_INIT` (was `INIT_ATOMIC_INT`) * `sync::atomic::ATOMIC_UINT_INIT` (was `INIT_ATOMIC_UINT`) * `sync::Once` * `sync::ONCE_INIT` * `sync::Once::call_once` (was `doit`) * C == `pthread_once(..)` * Boost == `call_once(..)` * Windows == `InitOnceExecuteOnce` * `sync::Barrier` * `sync::Barrier::new` * `sync::Barrier::wait` (now returns a `bool`) * `sync::Semaphore::new` * `sync::Semaphore::acquire` * `sync::Semaphore::release` The following items remain unstable * `sync::SemaphoreGuard` * `sync::Semaphore::access` - it's unclear how this relates to the poisoning story of mutexes. * `sync::TaskPool` - the semantics of a failing task and whether a thread is re-attached to a thread pool are somewhat unclear, and the utility of this type in `sync` is question with respect to the jobs of other primitives. This type will likely become stable or move out of the standard library over time. * `sync::Future` - futures as-is have yet to be deeply re-evaluated with the recent core changes to Rust's synchronization story, and will likely become stable in the future but are unstable until that time comes. [breaking-change]
2015-01-02More falloutNick Cameron-3/+3
2015-01-02Fallout - change array syntax to use `;`Nick Cameron-1/+1
2014-12-31std: unbox closures used in function argumentsJorge Aparicio-1/+1
2014-12-31Revert "std: Re-enable at_exit()"Alex Crichton-23/+23
This reverts commit 9e224c2bf18ebf8f871efb2e1aba43ed7970ebb7. Conflicts: src/libstd/sys/windows/os.rs
2014-12-30rollup merge of #20061: aturon/stab-2-vec-sliceAlex Crichton-2/+2
Conflicts: src/libcollections/slice.rs src/libcollections/vec.rs src/libstd/sys/windows/os.rs
2014-12-30Fallout from stabilizationAaron Turon-2/+2
2014-12-30rollup merge of #20353: alexcrichton/snapshotsAlex Crichton-80/+1
2014-12-30Register new snapshotsAlex Crichton-80/+1
2014-12-30std: Re-enable at_exit()Alex Crichton-23/+23
The new semantics of this function are that the callbacks are run when the *main thread* exits, not when all threads have exited. This implies that other threads may still be running when the `at_exit` callbacks are invoked and users need to be prepared for this situation. Users in the standard library have been audited in accordance to these new rules as well. Closes #20012
2014-12-29Test fixes and rebase conflictsAlex Crichton-3/+3