summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2014-04-06auto merge of #13344 : eddyb/rust/kill-unboxed-vec, r=cmrbors-25/+0
Removes the special `ty_unboxed_vec` type from the type system. It was previously used only during translating `~[T]`/`~str` allocation and drop glue.
2014-04-06rustc: remove ty_unboxed_vec.Eduard Burtescu-25/+0
2014-04-06auto merge of #13315 : alexcrichton/rust/libc, r=alexcrichton,mebors-4334/+37
Rebasing of #12526 with a very obscure bug fixed on windows.
2014-04-06std: Ignore a flaky std::comm testAlex Crichton-1/+1
This test relies on the parent to be descheduled before the child sends its data. This has proved to be unreliable on libnative on the bots. It's a fairly trivial test regardless, so ignoring it for now won't lose much.
2014-04-05std: Fix a doc example on io::signalAlex Crichton-10/+9
This also makes the listener struct sendable again by explicitly putting the Send bound on the relevant Rtio object. cc #13352
2014-04-05Fix an unnecessary use of `cast::transmute`Tobias Bucher-1/+1
Wherever possible, more specialized variants of said functions should be used, such as in this case `cast::transmute_mmut_unsafe`.
2014-04-05auto merge of #13331 : pongad/rust/remove-wrapper, r=thestingerbors-205/+84
Fixes #12713
2014-04-04Removed cmath and instrinsic wrapper.Michael Darakananda-205/+84
2014-04-04Added grow_fn and retain to VecMichael Darakananda-1/+64
2014-04-04Register new snapshotsAlex Crichton-3/+1
2014-04-04auto merge of #12956 : killerswan/rust/docs, r=alexcrichtonbors-17/+91
2014-04-04Fix fallout from std::libc separationCorey Richardson-24/+34
2014-04-04Remove libc from stdCorey Richardson-4310/+3
These wrappers are bound to a specific libc, and they don't need to be part of libstd.
2014-04-04auto merge of #13301 : erickt/rust/remove-refcell-get, r=huonwbors-28/+7
`RefCell::get` can be a bit surprising, because it actually clones the wrapped value. This removes `RefCell::get` and replaces all the users with `RefCell::borrow()` when it can, and `RefCell::borrow().clone()` when it can't. It removes `RefCell::set` for consistency. This closes #13182. It also fixes an infinite loop in a test when debugging is on.
2014-04-04auto merge of #13295 : huonw/rust/gate-concat-idents, r=alexcrichtonbors-1/+2
rustc: feature-gate `concat_idents!`. concat_idents! is not as useful as it could be, due to macros only being allowed in limited places, and hygiene, so lets feature gate it until we make a decision about it. cc #13294
2014-04-04rustc: feature-gate `concat_idents!`.Huon Wilson-1/+2
concat_idents! is not as useful as it could be, due to macros only being allowed in limited places, and hygiene, so lets feature gate it until we make a decision about it. cc #13294
2014-04-04[std::cmp] add missing docs and provide an exampleKevin Cantu-17/+91
2014-04-04auto merge of #13255 : alexcrichton/rust/issue-5605, r=huonwbors-0/+259
These syntax extensions need a place to be documented, and this starts passing a `--cfg dox` parameter to `rustdoc` when building and testing documentation in order to document macros so that they have no effect on the compiled crate, but only documentation. Closes #5605
2014-04-03auto merge of #12964 : gereeter/rust/extended-atomics, r=alexcrichtonbors-1/+133
Fixes #12949.
2014-04-03std: Remove `RefCell::set()`Erick Tryzelaar-11/+1
2014-04-03std: Remove `RefCell::get()`Erick Tryzelaar-18/+7
It's surprising that `RefCell::get()` is implicitly doing a clone on a value. This patch removes it and replaces all users with either `.borrow()` when we can autoderef, or `.borrow().clone()` when we cannot.
2014-04-03auto merge of #13296 : brson/rust/0.11-pre, r=alexcrichtonbors-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03auto merge of #13237 : alexcrichton/rust/private-tuple-structs, r=brsonbors-11/+19
This is the final commit need to implement [RFC #4](https://github.com/rust-lang/rfcs/blob/master/active/0004-private-fields.md), it makes all tuple struct fields private by default, overridable with the `pub` keyword. I'll note one divergence from the original RFC which is outlined in the first commit.
2014-04-03Add fetch_and, fetch_or, fetch_xor to AtomicInt, AtomicUintJonathan S-1/+133
2014-04-03auto merge of #13290 : alexcrichton/rust/rollup, r=alexcrichtonbors-6/+64
Closes #13285 (rustc: Stop using LLVMGetSectionName) Closes #13280 (std: override clone_from for Vec.) Closes #13277 (serialize: add a few missing pubs to base64) Closes #13275 (Add and remove some ignore-win32 flags) Closes #13273 (Removed managed boxes from libarena.) Closes #13270 (Minor copy-editing for the tutorial) Closes #13267 (fix Option<~ZeroSizeType>) Closes #13265 (Update emacs mode to support new `#![inner(attribute)]` syntax.) Closes #13263 (syntax: Remove AbiSet, use one Abi)
2014-04-03Test fixes from the rollupAlex Crichton-5/+5
2014-04-03Bump version to 0.11-preBrian Anderson-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03std: Document builtin syntax extensionsAlex Crichton-0/+259
These syntax extensions need a place to be documented, and this starts passing a `--cfg dox` parameter to `rustdoc` when building and testing documentation in order to document macros so that they have no effect on the compiled crate, but only documentation. Closes #5605
2014-04-03auto merge of #13286 : alexcrichton/rust/release, r=brsonbors-1/+1
Merging the 0.10 release into the master branch.
2014-04-03fix Option<~ZeroSizeType>Daniel Micay-2/+11
1778b6361627c5894bf75ffecf427573af02d390 provided the guarantee of no `exchange_free` calls for ~ZeroSizeType, so a sentinel can now be used without overhead. Closes #11998
2014-04-03std: override clone_from for Vec.Huon Wilson-4/+53
A vector can reuse its allocation (and the allocations/resources of any contained values) when cloning into an already-instantiated vector, so we might as well do so.
2014-04-02Fix fallout of requiring uint indicesAlex Crichton-24/+26
2014-04-02rand: remove (almost) all ~[]'s from Vec.Huon Wilson-15/+17
There are a few instances of them in tests which are using functions from std etc. that still are using ~[].
2014-04-02auto merge of #13243 : huonw/rust/cellshow, r=thestingerbors-2/+13
std: fix Cell's Show instance. Previously it was printing the address of the Unsafe contained in the Cell (i.e. the address of the Cell itself). This is clearly useless, and was presumably a mistake due to writing `*&` instead of `&*`. However, this later expression is likely also incorrect, since it takes a reference into a Cell while other user code is executing (i.e. the Show instance for the contained type), hence the contents should just be copied out.
2014-04-01auto merge of #13241 : stepancheg/rust/push-all, r=alexcrichtonbors-7/+3
* push_all* operations should reserve capacity before pushing data to avoid unnecessary reallocations * reserve_exact should never shrink, as specified in documentation
2014-04-01auto merge of #13225 : thestinger/rust/num, r=cmrbors-278/+126
The `Float` trait methods will be usable as functions via UFCS, and we came to a consensus to remove duplicate functions like this a long time ago. It does still make sense to keep the duplicate functions when the trait methods are static, unless the decision to leave out the in-scope trait name resolution for static methods changes.
2014-04-01Reimplement Vec::push_all* with .extendStepan Koltsov-6/+2
It is shorter and also fixes missed reserve call.
2014-04-01Vec::reserve_exact should not shrinkStepan Koltsov-1/+1
reserve_exact should not shrink according to documentation.
2014-04-01auto merge of #13115 : huonw/rust/rand-errors, r=alexcrichtonbors-34/+122
move errno -> IoError converter into std, bubble up OSRng errors Also adds a general errno -> `~str` converter to `std::os`, and makes the failure messages for the things using `OSRng` (e.g. (transitively) the task-local RNG, meaning hashmap initialisation failures aren't such a black box).
2014-04-01std: fix Cell's Show instance.Huon Wilson-2/+13
Previously it was printing the address of the Unsafe contained in the Cell (i.e. the address of the Cell itself). This is clearly useless, and was presumably a mistake due to writing `*&` instead of `&*`. However, this later expression is likely also incorrect, since it takes a reference into a Cell while other user code is executing (i.e. the Show instance for the contained type), hence the contents should just be copied out.
2014-04-01remove the cmath moduleDaniel Micay-205/+126
This is an implementation detail of the `f32` and `f64` modules and it should not be public. It renames many functions and leaves out any provided by LLVM intrinsics, so it is not a sensible binding to the C standard library's math library and will never be a stable target. This also removes the abuse of link_name so that this can be switched to using automatically generated definitions in the future. This also removes the `scalbn` binding as it is equivalent to `ldexp` when `FLT_RADIX` is 2, which must always be true for Rust.
2014-04-01rand: bubble up IO messages futher.Huon Wilson-23/+23
The various ...Rng::new() methods can hit IO errors from the OSRng they use, and it seems sensible to expose them at a higher level. Unfortunately, writing e.g. `StdRng::new().unwrap()` gives a much poorer error message than if it failed internally, but this is a problem with all `IoResult`s.
2014-04-01std: migrate the errno -> IoError converter from libnative.Huon Wilson-11/+99
This also adds a direct `errno` -> `~str` converter, rather than only being possible to get a string for the very last error.
2014-03-31Switch some tuple structs to pub fieldsAlex Crichton-11/+19
This commit deals with the fallout of the previous change by making tuples structs have public fields where necessary (now that the fields are private by default).
2014-03-31std: Switch field privacy as necessaryAlex Crichton-893/+889
2014-03-31num: rm wrapping of `Float` methods as functionsDaniel Micay-73/+0
The `Float` trait methods will be usable as functions via UFCS, and we came to a consensus to remove duplicate functions like this a long time ago. It does still make sense to keep the duplicate functions when the trait methods are static, unless the decision to leave out the in-scope trait name resolution for static methods changes.
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-31auto merge of #13221 : thestinger/rust/append, r=alexcrichtonbors-32/+32
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-32/+32
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30Rename `from_iterator` to `from_iter` for consistency.Brian Anderson-8/+8