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 13 pull requests #40651

Merged
merged 30 commits into from
Mar 19, 2017
Merged

Rollup of 13 pull requests #40651

merged 30 commits into from
Mar 19, 2017

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 14, 2017

  1. Configuration menu
    Copy the full SHA
    9ac628d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b43c744 View commit details
    Browse the repository at this point in the history
  3. 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
  4. 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. 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. Configuration menu
    Copy the full SHA
    910532e 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 authored 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
    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
    8eaac08 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2017

  1. Add mention of None as possible return. Closes rust-lang#40435.

    Russell Mackenzie committed Mar 19, 2017
    Configuration menu
    Copy the full SHA
    b77d31a View commit details
    Browse the repository at this point in the history
  2. Fix a typo in path.rs docs

    The name of the variable used in the example is `path`, not `os_str`.
    s3rvac committed Mar 19, 2017
    Configuration menu
    Copy the full SHA
    7add53e View commit details
    Browse the repository at this point in the history
  3. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    7b686ce View commit details
    Browse the repository at this point in the history
  4. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    9032cea View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#40562 - mbrubeck:bootstrap, r=alexcrichton

    Remove unused param from bootstrap::clean::rm_rf
    
    None
    frewsxcv authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    8287d0d View commit details
    Browse the repository at this point in the history
  6. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    a04c7de View commit details
    Browse the repository at this point in the history
  7. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    c949f49 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#40588 - topecongiro:add-missing-tests, r=al…

    …excrichton
    
    Add a test for issue 34571
    
    Closes rust-lang#34571.
    frewsxcv authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    03a30b5 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#40589 - topecongiro:floating-point-literal,…

    … r=nagisa
    
    Parse 0e+10 as a valid floating-point literal
    
    Fixes issue rust-lang#40408.
    frewsxcv authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    f2290da View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#40590 - z1mvader:master, r=steveklabnik

    documented order of conversion between u32 an ipv4addr
    
    This fixes rust-lang#40118
    frewsxcv authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    d74c528 View commit details
    Browse the repository at this point in the history
  11. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    969e625 View commit details
    Browse the repository at this point in the history
  12. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    d8c8e01 View commit details
    Browse the repository at this point in the history
  13. 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 authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    9e11ecb View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#40646 - russmack:issue-40435-mention-none, …

    …r=frewsxcv
    
    Add mention of None as possible return. Closes rust-lang#40435.
    
    This commit adds a small mention to some methods that None is returned when the slice is empty.
    frewsxcv authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    35cf2f9 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#40648 - s3rvac:fix-path-docs-typo, r=frewsxcv

    Fix a typo in path.rs docs
    
    The name of the variable used in the example is `path`, not `os_str`.
    frewsxcv authored Mar 19, 2017
    Configuration menu
    Copy the full SHA
    94e346b View commit details
    Browse the repository at this point in the history