summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-02-21Rollup merge of #48325 - frewsxcv:frewxcv-ignore, r=steveklabnikGuillaume Gomez-7/+7
Mark doc examples w/ `extern` blocks as `ignore`. Fixes https://github.com/rust-lang/rust/issues/48218.
2018-02-21Rollup merge of #48314 - frewsxcv:frewsxcv-broken-link, r=GuillaumeGomezGuillaume Gomez-1/+1
Fix broken documentation link. None
2018-02-20make `#[unwind]` attribute specify expectations more clearlyNiko Matsakis-2/+4
You can now choose between the following: - `#[unwind(allowed)]` - `#[unwind(aborts)]` Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though I think we should change this eventually.
2018-02-20Make signature of Path::strip_prefix un-bizarreMichael Lamparski-8/+10
BREAKING CHANGE: This has the potential to cause regressions in type inference.
2018-02-20Fix doc compile errorVitali Lovich-1/+1
2018-02-20stage0 cfg cleanupMark Simulacrum-1/+0
2018-02-19Add missing linkAndreas Streichardt-0/+2
2018-02-18Add tests ensuring zero-Duration timeouts result in errors.Corey Farwell-1/+77
Part of https://github.com/rust-lang/rust/issues/48311
2018-02-18Mark doc examples w/ `extern` blocks as `ignore`.Corey Farwell-7/+7
Fixes https://github.com/rust-lang/rust/issues/48218.
2018-02-18Rollup merge of #48312 - frewsxcv:frewsxcv-section-headings, r=QuietMisdreavusGuillaume Gomez-9/+9
Unify 'Platform-specific behavior' documentation headings. None
2018-02-18Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkorGuillaume Gomez-5/+5
fix more typos found by codespell.
2018-02-18Rollup merge of #48273 - alercah:file-warning, r=joshtriplettGuillaume Gomez-0/+15
Add a warning to File about mutability. Fixes #47708.
2018-02-18Auto merge of #47687 - SimonSapin:panic-impl, r=sfacklerbors-198/+26
RFC 2070 part 1: PanicInfo and Location API changes This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html Tracking issue: https://github.com/rust-lang/rust/issues/44489 * Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`. * Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`. * Implement `Display` for `PanicInfo` and `Location`
2018-02-18Auto merge of #47544 - U007D:master, r=nikomatsakisbors-12/+3
Relax termination_trait's error bound As per [this conversation](https://github.com/withoutboats/failure/issues/130#issuecomment-358572413) with @withoutboats and @bkchr
2018-02-17Fix broken documentation link.Corey Farwell-1/+1
2018-02-17Unify 'Platform-specific behavior' documentation headings.Corey Farwell-9/+9
2018-02-17Fix tidy violationVitali Lovich-3/+5
2018-02-17fix more typos found by codespell.Matthias Krüger-5/+5
2018-02-17Auto merge of #48294 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-52/+4
Rollup of 8 pull requests - Successful merges: #48095, #48152, #48234, #48239, #48243, #48260, #48284, #48286 - Failed merges:
2018-02-17Wording fixes from review for File.Alexis Hunt-5/+5
2018-02-17Rollup merge of #48239 - GuillaumeGomez:fix-condvar-example, r=QuietMisdreavusGuillaume Gomez-2/+4
Fix condvar example Fixes #48230. r? @QuietMisdreavus
2018-02-17Rollup merge of #48234 - zombiezen:patch-1, r=steveklabnikGuillaume Gomez-2/+0
Remove "empty buffer" doc in read_until This appears copied from fill_buf, but the above paragraph already indicates that a lack of delimiter at the end is EOF.
2018-02-17Rollup merge of #48152 - antoyo:primitive-docs-relevant, r=QuietMisdreavusGuillaume Gomez-48/+0
Primitive docs relevant This fixes the documentation to show the right types in the examples for many integer methods. I need to check if the result is correct before we merge.
2018-02-17Auto merge of #47956 - retep998:is-nibbles, r=BurntSushibors-21/+44
This is the ideal FileType on Windows. You may not like it, but this is what peak performance looks like. Theoretically this would fix https://github.com/rust-lang/rust/issues/46484 The current iteration of this PR should not cause existing code to break, but instead merely improves handling around reparse points. Specifically... * Reparse points are considered to be symbolic links if they have the name surrogate bit set. Name surrogates are reparse points that effectively act like symbolic links, redirecting you to a different directory/file. By checking for this bit instead of specific tags, we become much more general in our handling of reparse points, including those added by third parties. * If something is a reparse point but does not have the name surrogate bit set, then we ignore the fact that it is a reparse point because it is actually a file or directory directly there, despite having additional handling by drivers due to the reparse point. * For everything which is not a symbolic link (including non-surrogate reparse points) we report whether it is a directory or a file based on the presence of the directory attribute bit. * Notably this still preserves invariant that when `is_symlink` returns `true`, both `is_dir` and `is_file` will return `false`. The potential for breakage was far too high. * Adds an unstable `FileTypeExt` to allow users to determine whether a symbolic link is a directory or a file, since `FileType` by design is incapable of reporting this information.
2018-02-16Fix unit test compilationVitali Lovich-11/+17
Also fix some code snippets in documentation.
2018-02-16Add a warning to File about mutability.Alexis Hunt-0/+15
Fixes #47708.
2018-02-15Fix condvar exampleGuillaume Gomez-2/+4
2018-02-15Remove "empty buffer" doc in read_untilRoss Light-2/+0
This appears copied from fill_buf, but the above paragraph already indicates that a lack of delimiter at the end is EOF.
2018-02-14Rollup merge of #48035 - technicalguy:Early-exit-empty-hashmap-38880, ↵kennytm-26/+38
r=arthurprs Early exit for empty HashMap (issue #38880) Addresses issue #38880 by checking if the HashMap is empty before computing the value of the hash. Before (integer keys) ``` running 4 tests test empty_once ... bench: 13 ns/iter (+/- 0) test empty_100 ... bench: 1,367 ns/iter (+/- 35) test exist_once ... bench: 14 ns/iter (+/- 0) test exist_100 ... bench: 1,518 ns/iter (+/- 40) ``` After ``` running 4 tests test empty_once ... bench: 2 ns/iter (+/- 0) test empty_100 ... bench: 221 ns/iter (+/- 0) test exist_once ... bench: 15 ns/iter (+/- 0) test exist_100 ... bench: 1,515 ns/iter (+/- 92) ``` When the HashMap is not empty, the performance remains the same, and when it is empty the performance is significantly improved.
2018-02-14Rollup merge of #48133 - matthiaskrgr:endianess_to_endianness, r=oli-obkkennytm-2/+2
typo: correct endianess to endianness (this also changes function names!)
2018-02-14Rollup merge of #48130 - ollie27:stab, r=Mark-Simulacrumkennytm-2/+2
Correct a few stability attributes * `core_float_bits`, `duration_core`, `path_component_asref`, and `repr_align` were stabalized in 1.25.0 not 1.24.0. * Impls for `NonNull` involving unstable things should remain unstable. * `Duration` should remain stable since 1.3.0 so it appears correctly in the `std` docs. * `cursor_mut_vec` is an impl on only stable things so should be marked stable.
2018-02-14Rollup merge of #48005 - panicbit:env_unimpl_send_sync, r=alexcrichtonkennytm-0/+12
Unimplement Send/Sync for ::env::{Args,ArgsOs,Vars,VarsOs} Fixes #48004
2018-02-1338880 remove unnecessary self.table.size checkShaun Steenkamp-4/+0
2018-02-13Misc fixesVitali Lovich-4/+4
Switch feature guards to unstable Add missing semicolon Remove mut that's no longer necessary
2018-02-1338880 fix incorrect negationShaun Steenkamp-1/+1
2018-02-1338880 hashmap check size=0, not just capacity=0Shaun Steenkamp-30/+24
2018-02-1338880 restore original entry(key) methodShaun Steenkamp-1/+3
2018-02-12Fix wait_timeout valueVitali Lovich-1/+1
2018-02-12changed termination_trait's bound from Error to Debug; added compiletest ↵Brad Gibson-12/+3
header command and appropriate tests
2018-02-12Stabilize 'entry_and_modify' feature for HashMaphedgehog1024-2/+1
2018-02-1238880 fixup add missing mutShaun Steenkamp-1/+1
2018-02-1238880 remove redundant extra functionShaun Steenkamp-14/+6
2018-02-11Make primitive types docs relevantGuillaume Gomez-48/+0
2018-02-11Add an unstable FileTypeExt extension trait for WindowsPeter Atashian-0/+21
2018-02-11typo: correct endianess to endianness (this also changes function names!)Matthias Krüger-2/+2
2018-02-10Correct a few stability attributesOliver Middleton-2/+2
2018-02-07update the builtin macro doc stubsMichael Lamparski-5/+20
2018-02-07Rollup merge of #47631 - SimonSapin:nonnull, r=alexcrichtonManish Goregaokar-1/+1
Add some APIs to ptr::NonNull and fix `since` attributes This is a follow-up to its stabilization in https://github.com/rust-lang/rust/pull/46952. Tracking issue: https://github.com/rust-lang/rust/issues/27730. * These trait impls are insta-stable: `Hash`, `PartialEq`, `Eq`, `PartialOrd` and `Ord`. * The new `cast<U>() -> NonNull<U>` method is `#[unstable]`. It was proposed in https://github.com/rust-lang/rust/pull/46952#issuecomment-359220010.
2018-02-07libcore/libstd: fix commas in macro_rules! macrosMichael Lamparski-0/+3
BREAKING CHANGE: (or perhaps, *bugfix*) In #![no_std] applications, the following calls to `panic!` used to behave differently; they now behave the same. Old behavior: panic!("{{"); // panics with "{{" panic!("{{",); // panics with "{" New behavior: panic!("{{"); // panics with "{{" panic!("{{",); // panics with "{{" This only affects calls to `panic!` (and by proxy `assert` and `debug_assert`) with a single string literal followed by a trailing comma, and only in `#![no_std]` applications.
2018-02-07Rollup merge of #46962 - clarcharr:os_raw_docs, r=QuietMisdreavuskennytm-5/+124
Document std::os::raw. This adds a brief explanation to each type and its definition according to C. This also helps clarify that the definitions of the types, as described by rustdoc, are not necessarily the same from platform to platform.