Skip to content

Rollup of 8 pull requests #82053

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

Merged
merged 18 commits into from
Feb 13, 2021
Merged

Rollup of 8 pull requests #82053

merged 18 commits into from
Feb 13, 2021

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

schteve and others added 18 commits February 6, 2021 21:20
Neither does it shorten the code nor does it provide a helpful name.

Verified

This commit was signed with the committer’s verified signature.
magurotuna Yusuke Tanaka

Verified

This commit was signed with the committer’s verified signature.
magurotuna Yusuke Tanaka
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
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>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…r=Mark-Simulacrum

Organize trait test files

Organizes trait tests in folders where reasonable and removes name redundancies.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…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 |_| {
   |           ^^^^^
```

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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`

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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`

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…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`

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…=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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…-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>
@rustbot rustbot added the rollup A PR which is a rollup label Feb 13, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=8 rollup=never

@bors
Copy link
Collaborator

bors commented Feb 13, 2021

📌 Commit 0ca5fd7 has been approved by JohnTitor

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 13, 2021
@bors
Copy link
Collaborator

bors commented Feb 13, 2021

⌛ Testing commit 0ca5fd7 with merge dd4851d...

@bors
Copy link
Collaborator

bors commented Feb 13, 2021

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing dd4851d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 13, 2021
@bors bors merged commit dd4851d into rust-lang:master Feb 13, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet