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

Account for suggestions for complete removal of lines #94788

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Mar 9, 2022

Fix #94192.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2022
@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 9, 2022
@compiler-errors
Copy link
Member

Ooh, does it also fix #92741?

@estebank
Copy link
Contributor Author

estebank commented Mar 9, 2022

@compiler-errors it doesn't :(

The problem for that is that the machinery didn't account for the possibility of the removed code spanning multiple lines. I started looking at what would be necessary to get that to work well, and it will need a larger refactor than I can dedicate myself to.

For what is worth, a good repro case for this:

fn yam<T>(foo: Wrapper<T>)
//~^ ERROR the size for values of type `T` cannot be known at compilation time
where
    T
    :
    ?
    Sized {
    //
}

It should show all of the lines being removed. Thankfully this is only on the cli output, rustfix's is still correct.

@compiler-errors
Copy link
Member

Alrighty! Thanks for the explanation :)

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 10, 2022

📌 Commit ac2afa0 has been approved by petrochenkov

@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 Mar 10, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#92150 (Improve suggestion when casting usize to (possibly) wide pointer)
 - rust-lang#94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`)
 - rust-lang#94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`)
 - rust-lang#94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`)
 - rust-lang#94788 (Account for suggestions for complete removal of lines)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6bbaca7 into rust-lang:master Mar 10, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 10, 2022
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.

"help: consider removing" yields an empty suggestion
6 participants