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 suggestion for argument-position impl ?Sized #112614

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

lukas-code
Copy link
Member

fixes this invalid suggestion:

help: consider removing the `?Sized` bound to make the type parameter `Sized`
  |
1 - fn foo(_: impl ?Sized) {}
1 + fn foo(_: impl ) {}
  |

@rustbot
Copy link
Collaborator

rustbot commented Jun 14, 2023

r? @cjgillot

(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 Jun 14, 2023
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

Perhaps this should instead suggest impl Sized? 😅

@lukas-code lukas-code changed the title don't suggest removing ?Sized from argument-position impl trait if it's the only bound tweak suggestion for argument-position impl ?Sized Jun 14, 2023
@lukas-code
Copy link
Member Author

Sure, I've updated it to suggest removing the ? from ?Sized (as long as there are no macro crimes involved, in which case the suggestion is still off).

I've also added another commit to no longer print the full path of the Sized lang item.

@compiler-errors
Copy link
Member

r? @compiler-errors @bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 14, 2023

📌 Commit 179c47f461366e92897b5c5e0b69d97de771661a has been approved by compiler-errors

It is now in the queue for this repository.

@rustbot rustbot assigned compiler-errors and unassigned cjgillot Jun 14, 2023
@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 Jun 14, 2023
@bors
Copy link
Contributor

bors commented Jun 15, 2023

☔ The latest upstream changes (presumably #104455) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 15, 2023
@lukas-code
Copy link
Member Author

lukas-code commented Jun 15, 2023

rebased (drain_filter -> extract_if)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 15, 2023
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 15, 2023

📌 Commit b6a3f12 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 Jun 15, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2023
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#112403 (Prevent `.eh_frame` from being emitted for `-C panic=abort`)
 - rust-lang#112517 (`suspicious_double_ref_op`: don't lint on `.borrow()`)
 - rust-lang#112529 (Extend `unused_must_use` to cover block exprs)
 - rust-lang#112614 (tweak suggestion for argument-position `impl ?Sized`)
 - rust-lang#112654 (normalize closure output in equate_inputs_and_outputs)
 - rust-lang#112660 (Migrate GUI colors test to original CSS color format)
 - rust-lang#112664 (Add support for test tmpdir to fuchsia test runner)
 - rust-lang#112669 (Fix comment for ptr alignment checks in codegen)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit af955a6 into rust-lang:master Jun 16, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 16, 2023
@lukas-code lukas-code deleted the apit-unsized-suggestion branch June 16, 2023 09:22
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.

5 participants