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

Tweak E0277 &-removal suggestions #106360

Merged
merged 4 commits into from
Jan 12, 2023

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Jan 2, 2023

Fix #64068, fix #84837.

@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2023

r? @nagisa

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 2, 2023
@estebank
Copy link
Contributor Author

estebank commented Jan 2, 2023

r? @compiler-errors

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment was marked as resolved.

Comment on lines +1308 to +1369
while let Some((c, Some(parent_trait_pred))) = code.parent() {
// We want the root obligation, in order to detect properly handle
// `for _ in &mut &mut vec![] {}`.
code = c;
trait_pred = parent_trait_pred;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some sort of peel method that does this lol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a few (blame me for the nomenclature :P) but I think not for this ^_^'

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 11, 2023

📌 Commit 8393019ce977995825aec81c301d9414f27d41d9 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2023
@estebank
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Jan 12, 2023

📌 Commit 8b8cce1 has been approved by compiler-errors

It is now in the queue for this repository.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 12, 2023
… r=compiler-errors

Tweak E0277 `&`-removal suggestions

Fix rust-lang#64068, fix rust-lang#84837.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jan 12, 2023
… r=compiler-errors

Tweak E0277 `&`-removal suggestions

Fix rust-lang#64068, fix rust-lang#84837.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 12, 2023
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#103236 (doc: rewrite doc for signed int::{carrying_add,borrowing_sub})
 - rust-lang#103800 (Stabilize `::{core,std}::pin::pin!`)
 - rust-lang#106097 (Migrate mir_build diagnostics 2 of 3)
 - rust-lang#106170 (Move autoderef to `rustc_hir_analysis`)
 - rust-lang#106323 (Stabilize f16c_target_feature)
 - rust-lang#106360 (Tweak E0277 `&`-removal suggestions)
 - rust-lang#106524 (Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch)
 - rust-lang#106739 (Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 54f6fea into rust-lang:master Jan 12, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 12, 2023
@estebank estebank deleted the remove-borrow-suggestion branch November 9, 2023 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing/incorrect "&mut &mut [T] is not an iterator" Diagnostics for an immutable reference to an iterator
6 participants