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 8 pull requests #82053

Merged
merged 18 commits into from
Feb 13, 2021
Merged

Rollup of 8 pull requests #82053

merged 18 commits into from
Feb 13, 2021

Commits on Feb 7, 2021

  1. Configuration menu
    Copy the full SHA
    0488afd View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2021

  1. Configuration menu
    Copy the full SHA
    0d96a79 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2021

  1. Configuration menu
    Copy the full SHA
    788e4bb View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2021

  1. Add nll test

    0yoyoyo committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    fcce998 View commit details
    Browse the repository at this point in the history
  2. Drop an unnecessary intermediate variable

    Neither does it shorten the code nor does it provide a helpful name.
    LingMan committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    28347eb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    715c19e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    681ccca View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    95c984a View commit details
    Browse the repository at this point in the history
  6. Add docs for shared_from_slice From impls

    The advantage of making these docs is mostly in pointing out that these
    functions all make new allocations and copy/clone/move the source into them.
    
    These docs are on the function, and not the `impl` block, to avoid showing
    the "[+] show undocumented items" button.
    
    CC rust-lang#51430
    notriddle committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    7fafa4d View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2021

  1. Added tests to drain an empty vec

    Discovered this kind of issue in an unrelated library.
    The author copied the tests from here and AFAIK, there are no tests for this particular case.
    
    Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
    hbina committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    fa9af6a View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#81811 - schteve:fix_vec_retain_doc_test, r=…

    …m-ou-se
    
    Fix doc test for Vec::retain(), now passes clippy::eval_order_dependence
    
    Doc test for Vec::retain() works correctly but is flagged by clippy::eval_order_dependence. Fix avoids the issue by using an iterator instead of an index.
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    4cb3810 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#81900 - vandenheuvel:organize_trait_tests, …

    …r=Mark-Simulacrum
    
    Organize trait test files
    
    Organizes trait tests in folders where reasonable and removes name redundancies.
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    a390206 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#81995 - 0yoyoyo:fix-issue-81650-explicit-li…

    …fetime-error, r=estebank
    
    Fix suggestion to introduce explicit lifetime
    
    Addresses rust-lang#81650
    
    Error message after fix:
    
    ```
    error[E0311]: the parameter type `T` may not live long enough
      --> src/main.rs:25:11
       |
    24 | fn play_with<T: Animal + Send>(scope: &Scope, animal: T) {
       |              -- help: consider adding an explicit lifetime bound...: `T: 'a +`
    25 |     scope.spawn(move |_| {
       |           ^^^^^
       |
    note: the parameter type `T` must be valid for the anonymous lifetime #2 defined on the function body at 24:1...
      --> src/main.rs:24:1
       |
    24 | fn play_with<T: Animal + Send>(scope: &Scope, animal: T) {
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    note: ...so that the type `[closure@src/main.rs:25:17: 27:6]` will meet its required lifetime bounds
      --> src/main.rs:25:11
       |
    25 |     scope.spawn(move |_| {
       |           ^^^^^
    ```
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    14b217c View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#82031 - LingMan:unneeded_var, r=varkor

    Drop an unnecessary intermediate variable
    
    Neither does it shorten the code nor does it provide a helpful name.
    
    `@rustbot` modify labels +C-cleanup +T-compiler
    
    r? `@varkor`
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    f6677b0 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#82033 - magurotuna:issue82016, r=jyn514

    Refactor `get_word_attr` to return only `Option`
    
    This commit removes `bool` from the return type of `NestedAttributesExt::get_word_attr` so it will return only `Option<ast::NestedMetaItem>` for less redundancy.
    
    Closes rust-lang#82016
    
    r? `@jyn514`
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    4c8e38a View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82040 - GuillaumeGomez:ensure-src-link, r=C…

    …raftSpider
    
    Add test to prevent src link regression
    
    Fixes rust-lang#80502.
    
    This PR is simply about adding a test to prevent a regression.
    
    cc `@bugadani` `@CraftSpider`
    r? `@camelid`
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    3560ff3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#82041 - notriddle:shared-from-slice-docs, r…

    …=m-ou-se
    
    Add docs for shared_from_slice From impls
    
    The advantage of making these docs is mostly in pointing out that these
    functions all make new allocations and copy/clone/move the source into them.
    
    These docs are on the function, and not the `impl` block, to avoid showing
    the "[+] show undocumented items" button.
    
    CC rust-lang#51430
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    2673026 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#82050 - hbina:fix/added-test-to-drain-empty…

    …-vec, r=dtolnay
    
    Added tests to drain an empty vec
    
    Discovered this kind of issue in an unrelated library.
    The author copied the tests from here and AFAIK, there are no tests for this particular case.
    
    cmazakas/minivec#19
    
    Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
    JohnTitor committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    0ca5fd7 View commit details
    Browse the repository at this point in the history