about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-02-06make `IndexMut` a super trait over `Index`Jorge Aparicio-2/+0
closes #21630
2015-02-07fix outdated docsAlexis-28/+28
Conflicts: src/libstd/collections/mod.rs
2015-02-07fix outdated docsAlexis-9/+9
Conflicts: src/libstd/collections/mod.rs
2015-02-06More libcollections fixesManish Goregaokar-3/+3
2015-02-06Rollup merge of #21991 - steveklabnik:gh21915, r=huonwManish Goregaokar-1/+1
Fixes #21915
2015-02-06Rollup merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichtonManish Goregaokar-8/+7
New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`, are added to implement the lifetime convention as agreed in rust-lang/rfcs#556. The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are left deprecated for the time being. Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions. Contribution to #21923.
2015-02-06Rollup merge of #21969 - Gankro:collections-cleanup, r=alexcrichtonManish Goregaokar-124/+124
This is 99% burning ints to the ground, but I also got rid of useless annotations or made code more \"idiomatic\" as I went along. Mostly changes in tests.
2015-02-06Rollup merge of #21924 - steveklabnik:fix_try_docs, r=huonwManish Goregaokar-2/+2
This is now a Result, not an Option.
2015-02-06Rollup merge of #21925 - sfackler:allow-missing-copy, r=alexcrichtonManish Goregaokar-11/+0
This was particularly helpful in the time just after OIBIT's implementation to make sure things that were supposed to be Copy continued to be, but it's now creates a lot of noise for types that intentionally don't want to be Copy. r? @alexcrichton
2015-02-06Rollup merge of #21951 - Gankro:entry, r=aturonManish Goregaokar-8/+8
This also removes two erroneous re-exports of the Entry variants, and so is incidentally a [breaking-change], though presumably no one should have been using those. r? @aturon
2015-02-06Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnikManish Goregaokar-11/+11
The spelling corrections were made in both documentation comments and regular comments.
2015-02-06Rollup merge of #21964 - semarie:openbsd-env, r=alexcrichtonManish Goregaokar-14/+48
- add `_SC_GETPW_R_SIZE_MAX` constant - declare `struct passwd` - convert `load_self` to `current_exe` Note: OpenBSD don't provide system function to return a valuable Path for `env::current_exe`. The implementation is currently based on the value of `argv[0]`, which couldn't be used when executable is called via PATH.
2015-02-05Mention the queueueue-ness of mpsc.Steve Klabnik-1/+1
Fixes #21915
2015-02-05misc collections code cleanupAlexis-124/+124
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-170/+168
2015-02-05complete openbsd support for `std::env`Sébastien Marie-7/+37
- add `std::env:consts` - deprecating `std::os::consts` - refactoring errno_location()
2015-02-05unbreak tree for openbsd after #21787Sébastien Marie-7/+11
- add `_SC_GETPW_R_SIZE_MAX` constant - declare `struct passwd` - convert `load_self` to `current_exe` Note: OpenBSD don't provide system function to return a valuable Path for `env::current_exe`. The implementation is currently based on the value of `argv[0]`, which couldn't be used when executable is called via PATH.
2015-02-05Replace one more slice::from_raw_mut_buf added with new ioMikhail Zabaluev-3/+2
2015-02-05Replace usage of slice::from_raw_buf with slice::from_raw_partsMikhail Zabaluev-5/+5
New functions, slice::from_raw_parts and slice::from_raw_parts_mut, are added to implement the lifetime convention as agreed in RFC PR #556. The functions slice::from_raw_buf and slice::from_raw_mut_buf are left deprecated for the time being.
2015-02-04Fix for misspelled comments.Joseph Crail-11/+11
The spelling corrections were made in both documentation comments and regular comments.
2015-02-04remove all kind annotations from closuresJorge Aparicio-38/+38
2015-02-04stabilize core Entry APIAlexis-8/+8
2015-02-04Auto merge of #21544 - P1start:mangle-unicode, r=alexcrichtonbors-15/+15
`{` and `}` aren’t valid characters on ARM, so this makes Unicode characters render as, e.g., `$u38d$` instead of `$u{38d}`. This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*` (**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in backtraces.
2015-02-04Auto merge of #21892 - huonw:deprecate-rand, r=alexcrichtonbors-1/+12
Use [`rand`](https://crates.io/crates/rand) and [`derive_rand`](https://crates.io/crates/derive_rand) from crates.io. [breaking-change]
2015-02-03Switch missing_copy_implementations to default-allowSteven Fackler-11/+0
This was particularly helpful in the time just after OIBIT's implementation to make sure things that were supposed to be Copy continued to be, but it's now creates a lot of noise for types that intentionally don't want to be Copy.
2015-02-04Fix issue with rt::unwind::try() docsSteve Klabnik-2/+2
This is now a Result, not an Option.
2015-02-03Test fixes and rebase conflictsAlex Crichton-14/+24
2015-02-03rollup merge of #21910: Manishearth/missing_stabilityAlex Crichton-0/+1
Currently, if a `#![staged_api]` crate contains an exported item without a stability marker (or inherited stability), the item is useless. This change introduces a check to ensure that all exported items have a defined stability. it also introduces the `unmarked_api` feature, which lets users import unmarked features. While this PR should in theory forbid these from existing, in practice we can't be so sure; so this lets users bypass this check instead of having to wait for the library and/or compiler to be fixed (since otherwise this is a hard error). r? @aturon
2015-02-03rollup merge of #21893: vhbit/ios-build-fixAlex Crichton-14/+17
2015-02-04Fix Unicode name manglingP1start-15/+15
`{` and `}` aren’t valid characters on ARM. This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*` (**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in backtraces.
2015-02-03rollup merge of #21835: alexcrichton/iov2Alex Crichton-4/+2546
This commit is an implementation of [RFC 576][rfc] which adds back the `std::io` module to the standard library. No functionality in `std::old_io` has been deprecated just yet, and the new `std::io` module is behind the same `io` feature gate. [rfc]: https://github.com/rust-lang/rfcs/pull/576 A good bit of functionality was copied over from `std::old_io`, but many tweaks were required for the new method signatures. Behavior such as precisely when buffered objects call to the underlying object may have been tweaked slightly in the transition. All implementations were audited to use composition wherever possible. For example the custom `pos` and `cap` cursors in `BufReader` were removed in favor of just using `Cursor<Vec<u8>>`. A few liberties were taken during this implementation which were not explicitly spelled out in the RFC: * The old `LineBufferedWriter` is now named `LineWriter` * The internal representation of `Error` now favors OS error codes (a 0-allocation path) and contains a `Box` for extra semantic data. * The io prelude currently reexports `Seek` as `NewSeek` to prevent conflicts with the real prelude reexport of `old_io::Seek` * The `chars` method was moved from `BufReadExt` to `ReadExt`. * The `chars` iterator returns a custom error with a variant that explains that the data was not valid UTF-8.
2015-02-03Add new path moduleAaron Turon-3/+2571
Implements [RFC 474](https://github.com/rust-lang/rfcs/pull/474); see that RFC for details/motivation for this change. This initial commit does not include additional normalization or platform-specific path extensions. These will be done in follow up commits or PRs.
2015-02-04Deprecate in-tree `rand`, `std::rand` and `#[derive(Rand)]`.Huon Wilson-1/+12
Use the crates.io crate `rand` (version 0.1 should be a drop in replacement for `std::rand`) and `rand_macros` (`#[derive_Rand]` should be a drop-in replacement). [breaking-change]
2015-02-03Rename std::path to std::old_pathAaron Turon-19/+20
As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
2015-02-04Fix some missing stability attrsManish Goregaokar-0/+1
2015-02-03std: Add `io` module againAlex Crichton-4/+2546
This commit is an implementation of [RFC 576][rfc] which adds back the `std::io` module to the standard library. No functionality in `std::old_io` has been deprecated just yet, and the new `std::io` module is behind the same `io` feature gate. [rfc]: https://github.com/rust-lang/rfcs/pull/576 A good bit of functionality was copied over from `std::old_io`, but many tweaks were required for the new method signatures. Behavior such as precisely when buffered objects call to the underlying object may have been tweaked slightly in the transition. All implementations were audited to use composition wherever possible. For example the custom `pos` and `cap` cursors in `BufReader` were removed in favor of just using `Cursor<Vec<u8>>`. A few liberties were taken during this implementation which were not explicitly spelled out in the RFC: * The old `LineBufferedWriter` is now named `LineWriter` * The internal representation of `Error` now favors OS error codes (a 0-allocation path) and contains a `Box` for extra semantic data. * The io prelude currently reexports `Seek` as `NewSeek` to prevent conflicts with the real prelude reexport of `old_io::Seek` * The `chars` method was moved from `BufReadExt` to `ReadExt`. * The `chars` iterator returns a custom error with a variant that explains that the data was not valid UTF-8.
2015-02-03iOS: fixed buildValerii Hiora-14/+17
2015-02-03Auto merge of #21745 - chris-morgan:add-missing-unstable-attributes, r=huonwbors-0/+38
I’d kind of like to be able to use HashState in AnyMap, which I can’t do without a stability attribute on it. While I was at it I looked around and found a few more missing.
2015-02-02Test fixes and rebase conflictsAlex Crichton-6/+12
2015-02-02rollup merge of #21842: alexcrichton/issue-21839Alex Crichton-19/+9
Now that associated types are fully implemented the iterator adaptors only need type parameters which are associated with actual storage. All other type parameters can either be derived from these (e.g. they are an associated type) or can be bare on the `impl` block itself. This is a breaking change due to the removal of type parameters on these iterator adaptors, but code can fairly easily migrate by just deleting the relevant type parameters for each adaptor. Other behavior should not be affected. Closes #21839 [breaking-change]
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-90/+117
Conflicts: src/librustc/metadata/filesearch.rs src/librustc_back/target/mod.rs src/libstd/os.rs src/libstd/sys/windows/os.rs src/libsyntax/ext/tt/macro_parser.rs src/libsyntax/print/pprust.rs src/test/compile-fail/issue-2149.rs
2015-02-02rollup merge of #21787: alexcrichton/std-envAlex Crichton-679/+1998
Conflicts: src/libstd/sys/unix/backtrace.rs src/libstd/sys/unix/os.rs
2015-02-02rollup merge of #21754: semarie/openbsd-rebasedAlex Crichton-66/+206
Hi. Here a commit in order to add OpenBSD support to rust. - tests status: run-pass: test result: ok. 1879 passed; 0 failed; 24 ignored; 0 measured run-fail: test result: ok. 81 passed; 0 failed; 5 ignored; 0 measured compile-fail: test result: ok. 1634 passed; 0 failed; 22 ignored; 0 measured run-pass-fulldeps: test result: ok. 22 passed; 0 failed; 1 ignored; 0 measured compile-fail-fulldeps: test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured - The current implementation of load_self function (src/libstd/sys/unix/os.rs) isn't optimal as under OpenBSD I haven't found a reliable method to get the filename of a running process. The current implementation is enought for bootstrapping purpose. - I have disable `run-pass/tcp-stress.rs` test under openbsd. When run manually, the test pass, but when run under `compiletest`, it timeout and echo continuoulsy `Too many open files`. - For building with jemalloc, a more recent version of jemalloc would be mandatory. See https://github.com/jemalloc/jemalloc/pull/188 for more details.
2015-02-02remove unused mut qualifiersJorge Aparicio-6/+5
2015-02-02`for x in xs.into_iter()` -> `for x in xs`Jorge Aparicio-5/+5
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-5/+5
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-38/+38
2015-02-02impl IntoIterator for HashSetJorge Aparicio-1/+27
2015-02-02impl IntoIterator for HashMapJorge Aparicio-1/+37
2015-02-02register snapshotsJorge Aparicio-37/+3