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

Report better WF obligation leaf obligations in new solver #125191

Merged
merged 1 commit into from
May 17, 2024

Conversation

compiler-errors
Copy link
Member

r? lcnr

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 17, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 17, 2024

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor


trait Trait {
type Ty;
}

impl Trait for for<'a> fn(&'a u8, &'a u8) {
impl Trait for for<'a, 'b> fn(&'a u8, &'b u8) {
Copy link
Member Author

Choose a reason for hiding this comment

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

There's a chance that bc this binder is equal then we don't actually check anything. Need to do a HR-eq here in order to bump the universe.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe do let _bump: for<'a> fn(&'a (), &'a ()) = (|&(), &()| ()) as for<'a, 'b> fn(&'a (), &'b ()); instead then inside of test, removing Trait entirely

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually this is moot because we register obligations too early to ever bump the universe after you land your changes to registering opaques early lol

Copy link
Member Author

Choose a reason for hiding this comment

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

'm just gonna remove the test

error: the type `<Vec<str> as WellUnformed>::RequestNormalize` is not well-formed
--> $DIR/wf-normalization-sized.rs:22:10
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/wf-normalization-sized.rs:22:11
|
LL | const _: <Vec<str> as WellUnformed>::RequestNormalize = ();
Copy link
Member Author

Choose a reason for hiding this comment

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

Span for this error is preexisting. If we recorded the HirId of the type, we could improve it now, but that's best left for another PR.

@lcnr
Copy link
Contributor

lcnr commented May 17, 2024

r=me after CI

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented May 17, 2024

📌 Commit 119c7bb has been approved by lcnr

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 May 17, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#123694 (expand: fix minor diagnostics bug)
 - rust-lang#125171 (Rename `flatten(_mut)` → `as_flattened(_mut)`)
 - rust-lang#125181 (set `rust.channel` properly in source tarballs)
 - rust-lang#125186 (Remove duplicate word from addr docs)
 - rust-lang#125191 (Report better WF obligation leaf obligations in new solver)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3695449 into rust-lang:master May 17, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2024
Rollup merge of rust-lang#125191 - compiler-errors:wf, r=lcnr

Report better WF obligation leaf obligations in new solver

r? lcnr
@rustbot rustbot added this to the 1.80.0 milestone May 17, 2024
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants