-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 8 pull requests #82053
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Neither does it shorten the code nor does it provide a helpful name.
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 <[email protected]>
…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.
…r=Mark-Simulacrum Organize trait test files Organizes trait tests in folders where reasonable and removes name redundancies.
…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 |_| { | ^^^^^ ```
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`
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`
…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`
…=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
…-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 <[email protected]>
@bors r+ p=8 rollup=never |
📌 Commit 0ca5fd7 has been approved by |
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
☀️ Test successful - checks-actions |
This was referenced 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
get_word_attr
to return onlyOption
#82033 (Refactorget_word_attr
to return onlyOption
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup