about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-10-19Rollup merge of #29169 - apasel422:spell, r=steveklabnikSteve Klabnik-2/+2
r? @steveklabnik
2015-10-19Rollup merge of #29125 - iKevinY:std-io-doc-fixes, r=alexcrichtonSteve Klabnik-7/+7
Just a few minor spelling/grammar fixes.
2015-10-19Correct spelling in docsAndrew Paseltiner-2/+2
2015-10-19Auto merge of #28977 - arcnmx:cstring-into, r=alexcrichtonbors-2/+72
`OsString` has these sorts of conversions, while `CString` has been missing them. I'm iffy on `into_string` simply because the return type would be better off as `FromUtf8Error<CString>`, which of course isn't generic :cry: Also should a different/new feature gate be used?
2015-10-19Owned conversions for CStringarcnmx-2/+72
2015-10-18Clean up thread::spawnarcnmx-23/+16
2015-10-17Remove some trivial `transmute`sAndrew Paseltiner-2/+1
`rbml::writer::Encoder::unsafe_clone` had no users across the entire repo.
2015-10-17Fix minor issues with std::io docsKevin Yap-7/+7
2015-10-16Add `Shared` pointer and have `{Arc, Rc}` use itAndrew Paseltiner-0/+2
This change has two consequences: 1. It makes `Arc<T>` and `Rc<T>` covariant in `T`. 2. It causes the compiler to reject code that was unsound with respect to dropck. See compile-fail/issue-29106.rs for an example of code that no longer compiles. Because of this, this is a [breaking-change]. Fixes #29037. Fixes #29106.
2015-10-15Auto merge of #29031 - cristicbz:mtx_inner, r=alexcrichtonbors-0/+233
The implementation for `into_inner` was a bit more complex than I had hoped for---is there any simpler, less unsafe way of getting around the fact that one can't move out of a `Drop` struct? See #28968 and rust-lang/rfcs#1269 .
2015-10-15std: add into_inner and get_mut to RwLockCristi Cobzarenco-0/+118
2015-10-15std: add into_inner and get_mut to mutexCristi Cobzarenco-0/+115
2015-10-15Auto merge of #29021 - ogham:master, r=alexcrichtonbors-0/+22
This commit adds `#[derive(Clone)]` to `std::fs::Metadata`, making that struct cloneable. Although the exact contents of that struct differ between OSes, they all have it contain only value types, meaning that the data can be re-used without repercussions. It also adds `#[derive(Clone)]` to every type used by that struct across all OSes, including the various Unix `stat` structs and Windows's `WIN32_FILE_ATTRIBUTE_DATA`. This stems from my comment here: https://github.com/rust-lang/rfcs/issues/939#issuecomment-140524439
2015-10-15Rollup merge of #29068 - apasel422:tidy, r=alexcrichtonManish Goregaokar-5/+5
r? @alexcrichton
2015-10-15Rollup merge of #29047 - gkoz:doc_typo, r=steveklabnikManish Goregaokar-1/+1
None
2015-10-15Rollup merge of #29022 - apasel422:spell, r=steveklabnikManish Goregaokar-5/+5
r? @steveklabnik
2015-10-14Remove unnecessary parentheses around range expressionsAndrew Paseltiner-5/+5
2015-10-14Auto merge of #29003 - tari:freebsd-current_exe-vec, r=alexcrichtonbors-4/+4
Fixes #28995.
2015-10-14Fix the link to `Default` trait in the prelude docsGleb Kozyrev-1/+1
2015-10-14fix tidyManish Goregaokar-1/+1
2015-10-14fix link on std::result::ResultVladimir Rutsky-3/+2
The link is broken here: <https://doc.rust-lang.org/std/io/#types>. Looks like crate documentation generator uses only first paragraph of the module documentation and so doesn't resolve the link defined below.
2015-10-13Correct spelling in docsAndrew Paseltiner-5/+5
2015-10-13Make the Metadata struct CloneBen S-0/+22
This commit adds #[derive(Clone)] to std::fs::Metadata, making that struct cloneable. Although the exact contents of that struct differ between OSes, they all have it contain only value types, meaning that the data can be re-used without repercussions. It also adds #[derive(Clone)] to every type used by that struct across all OSes, including the various Unix `stat` structs and Windows's `WIN32_FILE_ATTRIBUTE_DATA`.
2015-10-12Don't use a Vec in os::current_exe on FreeBSD.Peter Marheine-4/+4
2015-10-11Clarify the behavior of `std::env::home_dir` and `std::env::temp_dir`Barosl Lee-2/+9
This concern was raised by #28940.
2015-10-10Auto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1bors-0/+7
implement RFC 1238: nonparametric dropck. cc #28498 cc @nikomatsakis
2015-10-09Auto merge of #27897 - sfackler:cursor-box-slice, r=alexcrichtonbors-0/+57
2015-10-09Implement Read, BufRead, Write and Seek for Cursor<Box<[u8]>>Steven Fackler-0/+57
2015-10-08Auto merge of #28900 - cristicbz:typos, r=alexcrichtonbors-16/+16
I found these automatically, but fixed them manually to ensure the semantics are correct. I know things like these are hardly important, since they only marginally improve clarity. But at least for me typos and simple grammatical errors trigger an---unjustified---sense of unprofessionalism, despite the fact that I make them all the time and I understand that they're the sort of thing that is bound to slip through review. Anyway, to find most of these I used: * `ag '.*//.*(\b[A-Za-z]{2,}\b) \1\b'` for repeated words * `ag '\b(the|this|those|these|a|it) (a|the|this|those|these|it)\b'` to find constructs like 'the this' etc. many false positives, but not too hard to scroll through them to actually find the mistakes. * `cat ../../typos.txt | paste -d'|' - - - - - - - - - - - - - - - - - - - - - - | tr '\n' '\0' | xargs -0 -P4 -n1 ag`. Hacky way to find misspellings, but it works ok. I got `typos.txt` from [Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines) * `ag '.*//.* a ([ae][a-z]|(o[^n])|(i[a-rt-z]))'` to find places where 'a' was followed by a vowel (requiring 'an' instead). I also used a handful more one off regexes that are too boring to reproduce here.
2015-10-08Auto merge of #27197 - nwin:generic-cursor-impl, r=alexcrichtonbors-49/+25
This is a revival of #23364. Github didn’t recognize my updated branch there. The cursor implementation now uses `AsRef` which means that fixed-sized array can now be used with `Cursor`. Besides that, the generic implementation simplifies the code as the macro can be avoided. The only drawback is, that specialized implementation for fixed-sized arrays are now ruled out unless [RFC#1210](https://github.com/rust-lang/rfcs/pull/1210) is accepted & implemented. `Box<[u8]>` cannot be used yet, but that should be mitigated by [implementing `AsRef` for `Box` and friends](https://internals.rust-lang.org/t/forward-implement-traits-on-smart-pointers-make-smart-pointers-more-transparent/2380/3). I will submit a separate PR for that later as it is an orthogonal issue.
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-16/+16
2015-10-06Replace multiple trailing newlines with a single trailing newlineCarlos Liam-1/+0
Sorry I didn’t get this in the last PR (#28864), I hadn’t thought of it.
2015-10-06Add RFC 1238's `unsafe_destructor_blind_to_params` (UGEH) where needed.Felix S. Klock II-0/+7
I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to bootstrap; but of course that alone was not sufficient for `make check`. Later I added `unsafe_destructor_blind_to_params` to collections, in particular `LinkedList` and `RawTable` (the backing representation for `HashMap` and `HashSet`), to get the regression tests exercising cyclic structure from PR #27185 building. ---- Note that the feature is `dropck_parametricity` (which is not the same as the attribute's name). We will almost certainly vary our strategy here in the future, so it makes some sense to have a not-as-ugly name for the feature gate. (The attribute name was deliberately selected to be ugly looking.)
2015-10-05Auto merge of #28717 - nagisa:optional-no-landing-pads, r=alexcrichtonbors-1/+11
Part of #28710 Landing pads during stage0 are now enabled by defaullt. Since this has its downsides and upsides either way, I made it possible to change the option through configure.
2015-10-05Fix MSVC stage0 with landing pads enabledSimonas Kazlauskas-1/+11
2015-10-03Auto merge of #28669 - arielb1:well-formed-methods, r=nikomatsakisbors-1/+2
By RFC1214: > Before calling a fn, we check that its argument and return types are WF. The previous code only checked the trait-ref, which was not enough in several cases. As this is a soundness fix, it is a [breaking-change]. Some new annotations are needed, which I think are because of #18653 and the imperfection of `projection_must_outlive` (that can probably be worked around by moving the wf obligation later). Fixes #28609 r? @nikomatsakis
2015-10-02fix falloutAriel Ben-Yehuda-1/+2
looks like some mix of #18653 and `projection_must_outlive`, but that needs to be investigated further (crater run?)
2015-10-02Use generic trait implementations for Cursor when possible.nwin-49/+25
2015-10-01replaced *_ptr with *_raw methods in docsCristian Kubis-3/+3
2015-10-01doc: fixed swapped docs for from_ptr and from_rawCristian Kubis-4/+4
2015-09-30Rollup merge of #28762 - steveklabnik:gh28073, r=nikomatsakisSteve Klabnik-0/+7
Fixes #28073
2015-09-30Rollup merge of #28749 - tshepang:patch-6, r=blussSteve Klabnik-1/+0
2015-09-30Rollup merge of #28745 - tshepang:typo, r=blussSteve Klabnik-1/+1
2015-09-30Rollup merge of #28744 - dato:usize-typo, r=AatchSteve Klabnik-1/+1
2015-09-30Make note of performance implications of ReadSteve Klabnik-0/+7
Fixes #28073
2015-09-30Auto merge of #28731 - bluss:by-ref, r=alexcrichtonbors-1/+1
Remove redundant uses of Iterator::by_ref()
2015-09-30path: remove a line of code that is not usefulTshepang Lekhonkhobe-1/+0
2015-09-30doc: fix typoTshepang Lekhonkhobe-1/+1
2015-09-30Auto merge of #28729 - retep998:canonical-dir, r=alexcrichtonbors-0/+11
cc https://github.com/rust-lang/rust/issues/27706
2015-09-30Fix typo in docs: usize is unsigned, not signed.Dato Simó-1/+1