-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 = (); |
There was a problem hiding this comment.
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.
r=me after CI |
@bors r=lcnr rollup |
…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
Rollup merge of rust-lang#125191 - compiler-errors:wf, r=lcnr Report better WF obligation leaf obligations in new solver r? lcnr
r? lcnr