Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 20 pull requests #40643

Closed
wants to merge 74 commits into from
Closed

Rollup of 20 pull requests #40643

wants to merge 74 commits into from

Commits on Mar 9, 2017

  1. Configuration menu
    Copy the full SHA
    c7db40f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50aee36 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2017

  1. Point to let when modifying field of immutable variable

    Point at the immutable local variable when trying to modify one of its
    fields.
    
    Given a file:
    
    ```rust
    struct Foo {
        pub v: Vec<String>
    }
    
    fn main() {
        let f = Foo { v: Vec::new() };
        f.v.push("cat".to_string());
    }
    ```
    
    present the following output:
    
    ```
    error: cannot borrow immutable field `f.v` as mutable
     --> file.rs:7:13
      |
    6 |    let f = Foo { v: Vec::new() };
      |        - this should be `mut`
    7 |    f.v.push("cat".to_string());
      |    ^^^
    
    error: aborting due to previous error
    ```
    estebank committed Mar 11, 2017
    Configuration menu
    Copy the full SHA
    6ba494b View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2017

  1. Change label to "consider changing this to mut f"

    Change the wording of mutable borrow on immutable binding from "this
    should be `mut`" to "consider changing this to `mut f`".
    estebank committed Mar 12, 2017
    Configuration menu
    Copy the full SHA
    38b5b29 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2017

  1. Initial attempt at implementing optimization fuel and re-enabling str…

    …uct field reordering.
    ahicks92 authored and alexcrichton committed Mar 13, 2017
    Configuration menu
    Copy the full SHA
    197e529 View commit details
    Browse the repository at this point in the history
  2. Make a comment better.

    ahicks92 authored and alexcrichton committed Mar 13, 2017
    Configuration menu
    Copy the full SHA
    8f36057 View commit details
    Browse the repository at this point in the history
  3. Tests for -Z fuel=foo=n

    ahicks92 authored and alexcrichton committed Mar 13, 2017
    Configuration menu
    Copy the full SHA
    c2d14fc View commit details
    Browse the repository at this point in the history
  4. UI test for -Z print-fuel=foo

    ahicks92 authored and alexcrichton committed Mar 13, 2017
    Configuration menu
    Copy the full SHA
    3fb94b7 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2017

  1. Configuration menu
    Copy the full SHA
    9ac628d View commit details
    Browse the repository at this point in the history
  2. Cleanup.

    jseyfried committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    460bf55 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    68c1cc6 View commit details
    Browse the repository at this point in the history
  4. Liberalize attributes.

    jseyfried committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    839c286 View commit details
    Browse the repository at this point in the history
  5. Add tests.

    jseyfried committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    85e02bd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b43c744 View commit details
    Browse the repository at this point in the history
  7. Use && instead of &

    It does not seem valuable to always evaluate the right-hand side here.
    tbg committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    20c0f32 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f06b049 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2017

  1. Change how the 0 flag works in format!

    Now it always implies right-alignment, so that padding zeroes are placed after the sign (if any) and before the digits. In other words, it always takes precedence over explicitly specified `[[fill]align]`. This also affects the '#' flag: zeroes are placed after the prefix (0b, 0o, 0x) and before the digits.
    
               :05     :<05    :>05    :^05
    before   |-0001| |-1000| |-0001| |-0100|
    after    |-0001| |-0001| |-0001| |-0001|
              :#05x   :<#05x  :>#05x  :^#05x
    before   |0x001| |0x100| |000x1| |0x010|
    after    |0x001| |0x001| |0x001| |0x001|
    
    Fixes rust-lang#39997 [breaking-change]
    Sawyer47 authored and alexcrichton committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    ff63866 View commit details
    Browse the repository at this point in the history
  2. Change how the 0 flag works in format! for floats

    Now it always implies right-alignment, so that padding zeroes are placed after the sign (if any) and before the digits. In other words, it always takes precedence over explicitly specified `[[fill]align]`.
    
                   :06      :<06     :>06     :^06
        before   |-001.2| |-1.200| |-001.2| |-01.20|
        after    |-001.2| |-001.2| |-001.2| |-001.2|
    Sawyer47 authored and alexcrichton committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    8065486 View commit details
    Browse the repository at this point in the history
  3. Rename TryFrom's associated type and implement str::parse using TryFrom.

    Per discussion on the tracking issue, naming `TryFrom`'s associated type
    `Error` is generally more consistent with similar traits in the Rust
    ecosystem, and what people seem to assume it should be called. It
    also helps disambiguate from `Result::Err`, the most common "Err".
    
    See
    rust-lang#33417 (comment).
    
    TryFrom<&str> and FromStr are equivalent, so have the latter provide the
    former to ensure that. Using TryFrom in the implementation of
    `str::parse` means types that implement either trait can use it.
    When we're ready to stabilize `TryFrom`, we should update `FromStr` to
    suggest implementing `TryFrom<&str>` instead for new code.
    
    See
    rust-lang#33417 (comment)
    and
    rust-lang#33417 (comment).
    
    Refs rust-lang#33417.
    jimmycuadra authored and alexcrichton committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    2561dcd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c11ab21 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    310f5bd View commit details
    Browse the repository at this point in the history
  6. rebased

    nrc committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    4cf22cb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    befeb04 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2017

  1. Configuration menu
    Copy the full SHA
    9b89274 View commit details
    Browse the repository at this point in the history
  2. isolate llvm 4.0 code path

    TimNN committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    449219a View commit details
    Browse the repository at this point in the history
  3. clang-format

    TimNN committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    222ca3c View commit details
    Browse the repository at this point in the history
  4. add missing global metadata

    TimNN committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    95bd7f2 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2017

  1. Configuration menu
    Copy the full SHA
    50cede0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    963d4df View commit details
    Browse the repository at this point in the history
  3. Fix typo in mutex.rs docs

    This seems to match other uses of "be accessed" in the document.
    ScottAbbey committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    ec8ecf4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    33a5665 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    65b7c4e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d38ea8b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9511fe6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    10510ae View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    37b38a2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    48890d4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a8f4a1b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1241a88 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    27fcdb8 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ae630ca View commit details
    Browse the repository at this point in the history
  15. Remove internal liblog

    This commit deletes the internal liblog in favor of the implementation that
    lives on crates.io. Similarly it's also setting a convention for adding crates
    to the compiler. The main restriction right now is that we want compiler
    implementation details to be unreachable from normal Rust code (e.g. requires a
    feature), and by default everything in the sysroot is reachable via `extern
    crate`.
    
    The proposal here is to require that crates pulled in have these lines in their
    `src/lib.rs`:
    
        #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
        #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]
    
    This'll mean that by default they're not using these attributes but when
    compiled as part of the compiler they do a few things:
    
    * Mark themselves as entirely unstable via the `staged_api` feature and the
      `#![unstable]` attribute.
    * Allow usage of other unstable crates via `feature(rustc_private)` which is
      required if the crate relies on any other crates to compile (other than std).
    alexcrichton committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    e4af5fd View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    cb96ade View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2017

  1. Configuration menu
    Copy the full SHA
    2976ddb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0af3775 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ffee956 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf80fec View commit details
    Browse the repository at this point in the history
  5. resolve instances to ty::Instance directly

    This removes the duplication between collector, callee, and (eventually)
    MIRI.
    arielb1 committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    aac5ba5 View commit details
    Browse the repository at this point in the history
  6. refactor away callee::Callee and translate virtual calls through a MI…

    …R shim
    
    These changes are in the same commit to avoid needing to adapt
    meth::trans_object_shim to the new scheme.
    
    One codegen-units test is broken because we instantiate the shims even
    when they are not needed. This will be fixed in the next PR.
    arielb1 committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    65a4266 View commit details
    Browse the repository at this point in the history
  7. collector: collect functions when they are called/reified

    This avoids the creation of unneeded vtable shims.
    arielb1 committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    a5e3c3d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e1f3c67 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2b9fea1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    26df816 View commit details
    Browse the repository at this point in the history
  11. translate drop glue using MIR

    Drop of arrays is now translated in trans::block in an ugly way that I
    should clean up in a later PR, and does not handle panics in the middle
    of an array drop, but this commit & PR are growing too big.
    arielb1 committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    f2c7917 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#39628 - arielb1:shimmir, r=eddyb

    Translate shims using MIR
    
    Still a work in progress.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    1bd4c94 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#40241 - Sawyer47:fix-39997, r=alexcrichton

    Change how the `0` flag works in format!
    
    Now it always implies right-alignment, so that padding zeroes are placed after the sign (if any) and before the digits. In other words, it always takes precedence over explicitly specified `[[fill]align]`. This also affects the '#' flag: zeroes are placed after the prefix (0b, 0o, 0x) and before the digits.
    
    Here's a short summary of how similar format strings work in Python and Rust:
    
    ```
                  :05     :<05    :>05    :^05
    Python 3.6  |-0001| |-1000| |000-1| |0-100|
    Rust before |-0001| |-1000| |-0001| |-0100|
    Rust after  |-0001| |-0001| |-0001| |-0001|
    
                 :#05x   :<#05x  :>#05x  :^#05x
    Python 3.6  |0x001| |0x100| |000x1| |00x10|
    Rust before |0x001| |0x100| |000x1| |0x010|
    Rust after  |0x001| |0x001| |0x001| |0x001|
    ```
    
    Fixes rust-lang#39997 [breaking-change]
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    9c955e8 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#40281 - jimmycuadra:try-from-from-str, r=at…

    …uron
    
    Rename TryFrom's associated type and implement str::parse using TryFrom.
    
    Per discussion on the tracking issue, naming `TryFrom`'s associated type `Error` is generally more consistent with similar traits in the Rust ecosystem, and what people seem to assume it should be called. It also helps disambiguate from `Result::Err`, the most common "Err".
    
    See rust-lang#33417 (comment).
    
    `TryFrom<&str>` and `FromStr` are equivalent, so have the latter provide the former to ensure that. Using `TryFrom` in the implementation of `str::parse` means types that implement either trait can use it. When we're ready to stabilize `TryFrom`, we should update `FromStr` to
    suggest implementing `TryFrom<&str>` instead for new code.
    
    See rust-lang#33417 (comment)
    and rust-lang#33417 (comment).
    
    Refs rust-lang#33417.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    8295bbe View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#40346 - jseyfried:path_and_tokenstream_attr…

    …, r=nrc
    
    `TokenStream`-based attributes, paths in attribute and derive macro invocations
    
    This PR
     - refactors `Attribute` to use  `Path` and `TokenStream` instead of `MetaItem`.
     - supports macro invocation paths for attribute procedural macros.
       - e.g. `#[::foo::attr_macro] struct S;`, `#[cfg_attr(all(), foo::attr_macro)] struct S;`
     - supports macro invocation paths for derive procedural macros.
       - e.g. `#[derive(foo::Bar, super::Baz)] struct S;`
     - supports arbitrary tokens as arguments to attribute procedural macros.
       - e.g. `#[foo::attr_macro arbitrary + tokens] struct S;`
     - supports using arbitrary tokens in "inert attributes" with derive procedural macros.
       - e.g. `#[derive(Foo)] struct S(#[inert arbitrary + tokens] i32);`
    where `#[proc_macro_derive(Foo, attributes(inert))]`
    
    r? @nrc
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    650c090 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#40347 - alexcrichton:rm-liblog, r=alexcrichton

    Remove internal liblog
    
    This commit deletes the internal liblog in favor of the implementation that
    lives on crates.io. Similarly it's also setting a convention for adding crates
    to the compiler. The main restriction right now is that we want compiler
    implementation details to be unreachable from normal Rust code (e.g. requires a
    feature), and by default everything in the sysroot is reachable via `extern
    crate`.
    
    The proposal here is to require that crates pulled in have these lines in their
    `src/lib.rs`:
    
        #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
        #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]
    
    This'll mean that by default they're not using these attributes but when
    compiled as part of the compiler they do a few things:
    
    * Mark themselves as entirely unstable via the `staged_api` feature and the
      `#![unstable]` attribute.
    * Allow usage of other unstable crates via `feature(rustc_private)` which is
      required if the crate relies on any other crates to compile (other than std).
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    805ce93 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#40348 - nrc:save-extern-fn, r=@eddyb

    Handle extern functions and statics in save-analysis
    
    r? @eddyb
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    8bc39f8 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#40377 - camlorn:optimization_fuel, r=arielb1

    Implement optimization fuel and re-enable struct field reordering
    
    See [this discussion](https://internals.rust-lang.org/t/rolling-out-or-unrolling-struct-field-reorderings/4485) for background.
    
    This pull request adds two new compilation options: `-Z print-fuel=crate` prints the optimization fuel used by a crate and `-Z fuel=crate=n` sets the optimization fuel for a crate.
    
    It also turns field reordering back on.  There is no way to test this feature without something consuming fuel.  We can roll this back if we want, but then the optimization fuel bits will be dead code.
    
    The one notable absence from this PR is a test case.  I'm not sure how to do one that's worth having.  The only thing I can think of to test is `-Z fuel=foo=0`.  The problem with other tests is that either (1) they're so big that future optimizations will apply, thus breaking them or (2) we don't know which order the optimizations will be applied in, so we can't guess the message that will be printed.  If someone has a useful proposal for a good test, I certainly want to add one.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    b235f5a View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#40398 - eddyb:struct-hint, r=nikomatsakis

    Propagate expected type hints through struct literals.
    
    Partial fix for rust-lang#31260 to maximize backwards-compatibility, i.e. the hint is provided but not coerced to.
    
    The added test works because `{...; x}` with a hint of `T` coerces `x` to `T`, and the reasoning why that is slightly different has to do with DSTs: `&Struct { tail: [x] }: &Struct<[T]>` has a hint of `[T]` for `[x]`, but the inferred type should be `[T; 1]` to succeed later, so `[x]` shouldn't be *forced* to be `[T]`.
    
    *However*, implementing that complete behavior in a backwards-compatible way may be non-trivial, and has not yet been fully investigated, while this PR fixes rust-lang#40355 and can be backported.
    
    r? @nikomatsakis
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    b03edc8 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#40409 - mbrubeck:calloc, r=sfackler

    Specialize Vec::from_elem to use calloc
    
    Fixes rust-lang#38723.  This specializes the implementation for `u8` only, but it could be extended to other zeroable types if desired.
    
    I haven't tested this extensively, but I did verify that it gives the expected performance boost for large `vec![0; n]` allocations with both alloc_system and jemalloc, on Linux.  (I have not tested or even built the Windows code.)
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    b2969fe View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#40441 - tschottdorf:promotable-rfc, r=eddyb

    Add feature gate for rvalue-static-promotion
    
    Probably needs more tests (which ones?) and there may be other things that need to be done. Also not sure whether the version that introduces the flag is really `1.15.1`.
    
    See rust-lang/rfcs#1414.
    
    Updates rust-lang#38865.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    4735cf6 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#40445 - estebank:issue-18150, r=jonathandtu…

    …rner
    
    Point to let when modifying field of immutable variable
    
    Point at the immutable local variable when trying to modify one of its
    fields.
    
    Given a file:
    
    ```rust
    struct Foo {
        pub v: Vec<String>
    }
    
    fn main() {
        let f = Foo { v: Vec::new() };
        f.v.push("cat".to_string());
    }
    ```
    
    present the following output:
    
    ```
    error: cannot borrow immutable field `f.v` as mutable
     --> file.rs:7:13
      |
    6 |    let f = Foo { v: Vec::new() };
      |        - this should be `mut`
    7 |    f.v.push("cat".to_string());
      |    ^^^
    
    error: aborting due to previous error
    ```
    
    Fix rust-lang#27593.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    bcafe56 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#40538 - aturon:stab-1.17, r=alexcrichton

    Library stabilizations for 1.17
    
    Details of the stabilizations are available in the commits. Includes only library stabilizations; there are a couple of compiler stabilizations that should also be done for 1.17.
    
    Will need a beta backport, which I will create after approval.
    
    r? @alexcrichton
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    8ed11ff View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#40562 - mbrubeck:bootstrap, r=alexcrichton

    Remove unused param from bootstrap::clean::rm_rf
    
    None
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    b4098c9 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#40564 - GuillaumeGomez:rustdoc-const, r=fre…

    …wsxcv
    
    Fix const not displayed in rustdoc
    
    Fixes rust-lang#40331.
    
    r? @rust-lang/docs
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    4b987ab View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#40581 - TimNN:di-global-40, r=alexcrichton

    [LLVM 4.0] Add missing debuginfo metadata to globals
    
    Fixes rust-lang#40580.
    
    cc @rkruppe
    cc rust-lang#40123
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    c991ce4 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#40583 - jseyfried:fix_include_macro_regress…

    …ion, r=nrc
    
    macros: fix regression with `include!()`
    
    Fixes rust-lang#40469, a regression when `include!()`ing a `macro_rules!` containing `$crate`.
    r? @nrc
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    f014ce8 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#40590 - z1mvader:master, r=steveklabnik

    documented order of conversion between u32 an ipv4addr
    
    This fixes rust-lang#40118
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    05c4a0d View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#40603 - QuietMisdreavus:slice-ptr-docs, r=G…

    …uillaumeGomez
    
    minor wording tweak to slice::{as_ptr, as_mut_ptr}
    
    Per rust-lang#37334, the slice-as-pointer methods mentioned that "modifying the slice may cause its buffer to be reallocated", when in fact modifying the *slice* itself would cause no such change. (It is a borrow, after all!) This is a tweak to the wording of that line to stress it's the *collection* that could cause the buffer to be reallocated.
    
    r? @steveklabnik
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    42c55c9 View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#40611 - ScottAbbey:patch-1, r=GuillaumeGomez

    Fix typo in mutex.rs docs
    
    This seems to match other uses of "be accessed" in the document.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    6a5ecf1 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#40621 - jswalden:dependant-spelling-fix, r=…

    …sfackler
    
    Fix a spelling error in HashMap documentation, and slightly reword surrounding text for precision
    
    Noticed while reading docs just now.
    
    It's possible that the prior wording *meant* to state that the seed's randomness depends on the exact instant that the system RNG was created, I guess.  But unless there's an API guarantee that this is the case, the wording seems over-precise.  Is there a formal API guarantee that would forbid, say, the system RNG from generating all output using the Intel RDRAND instruction?  I don't think the quality of output in that case would depend on when the RNG was created.  Yet it seems to me like it could well be a valid source of randomness when computing the initial seed.
    
    For that reason, tying the randomness of the seed, to the quality of the RNG's output *at the precise instant the seed is computed*, seems less confining.  That instantaneous quality level could be determined by the quality at the instant the RNG was created -- but instantaneous quality need not be low for that precise reason.
    frewsxcv committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    6b92bd6 View commit details
    Browse the repository at this point in the history