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

Fix various bugs in ty_kind_suggestion #123924

Merged
merged 4 commits into from
Apr 15, 2024
Merged

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 14, 2024

Consolidates two implementations of ty_kind_suggestion
Fixes some misuse of the empty param-env
Fixes a problem where we suggested (42) instead of (42,) for tuple suggestions
Suggest a value when return;, making it consistent with break;
Fixes #123906

@rustbot
Copy link
Collaborator

rustbot commented Apr 14, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Apr 14, 2024
@compiler-errors
Copy link
Member Author

r? estebank

@rustbot rustbot assigned estebank and unassigned petrochenkov Apr 14, 2024
--> $DIR/value-suggestion-ice-123906.rs:3:9
|
LL | fn as_chunks<const N: usize>() -> [u8; N] {
| ------- expected `[u8; ]` because of this return type
Copy link
Contributor

Choose a reason for hiding this comment

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

expected [u8; ]`

Interesting. Is this being fixed by #123926?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's where I found it

Copy link
Contributor

Choose a reason for hiding this comment

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

If so, these two PRs will not be able to land in the same rollup. Can you mark this as rollup=never if so?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well if we know that it's going to fail, then marking one or the other as rollup=never doesn't really do anything. That's why I unapproved the other PR, because I'd rather see this one land first.

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 15, 2024

📌 Commit 325b24d has been approved by estebank

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 Apr 15, 2024
@compiler-errors
Copy link
Member Author

There's a race between this and that other PR, so I'll r- that one and keep this one.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 15, 2024
…mpiler-errors

Rollup of 4 pull requests

Successful merges:

 - rust-lang#123900 (Stop using `PolyTraitRef` for closure/coroutine predicates already instantiated w placeholders)
 - rust-lang#123924 (Fix various bugs in `ty_kind_suggestion`)
 - rust-lang#123943 (Use the rustc_private libc less in tests)
 - rust-lang#123970 (zkvm: fix references to `os_str` module)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 20a5fb3 into rust-lang:master Apr 15, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 15, 2024
Rollup merge of rust-lang#123924 - compiler-errors:tuple-sugg, r=estebank

Fix various bugs in `ty_kind_suggestion`

Consolidates two implementations of `ty_kind_suggestion`
Fixes some misuse of the empty param-env
Fixes a problem where we suggested `(42)` instead of `(42,)` for tuple suggestions
Suggest a value when `return;`, making it consistent with `break;`
Fixes rust-lang#123906
@compiler-errors compiler-errors deleted the tuple-sugg branch April 16, 2024 01:27
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.

ICE: expected usize, got N/#0: usize
5 participants