Closed
Conversation
Fix few Clippy warnings
Avoid ICE when referencing desugared local binding in borrow error To avoid leaking the names of local bindings from expressions like for loops, rust-lang#60984 explicitly ignored them, but an assertion that `LocalKind::Var` *must* have a name would trigger an ICE. Before this change, the binding generated by desugaring the for loop would leak into the diagnostic (rust-lang#63027): ``` error[E0515]: cannot return value referencing local variable `__next` --> return-local-binding-from-desugaring.rs:LL:CC | LL | for ref x in xs { | ----- `__next` is borrowed here ... LL | result | ^^^^^^ returns a value referencing data owned by the current function ``` Ideally `LocalKind` would carry more information to more accurately explain the problem, but for now, in order to avoid the ICE (fix rust-lang#63026), we accept `LocalKind::Var` without a name and produce the following output: ``` error[E0515]: cannot return value referencing local binding --> $DIR/return-local-binding-from-desugaring.rs:30:5 | LL | for ref x in xs { | -- local binding introduced here ... LL | result | ^^^^^^ returns a value referencing data owned by the current function ```
…ttmcm In which we constantly improve the Vec(Deque) array PartialEq impls Use the same approach as in rust-lang#62435 as sanctioned by rust-lang#61415 (comment). r? @scottmcm
Add test for issue-50900 Closes rust-lang#50900
…albini Allow rustbot to add `F-*` + `requires-nightly`. r? @pietroalbini
Contributor
Author
|
@bors r+ p=5 rollup=never |
Collaborator
|
📌 Commit 6e9c219 has been approved by |
Collaborator
|
⌛ Testing commit 6e9c219 with merge d13867a9cfec6545272717d9ec437604e8ac8c33... |
Contributor
Author
|
@bors retry r- |
Contributor
|
Your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
F-*+requires-nightly. #63071 (Allow rustbot to addF-*+requires-nightly.)Failed merges:
r? @ghost