-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Migrate more stuff to the next solver #20841
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
Conversation
The bulk of the work is trait solving and cached in the trait solver's cache, and this will save memory.
| ), | ||
| }; | ||
| // if the arg is error like, render it to inform the user | ||
| if is_err(arg) { |
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.
This was needed because params without default would have an error default, but now they just have None.
|
|
||
| let sized_trait = LangItem::Sized.resolve_trait(db, resolver.krate()); | ||
| if let Some(sized_trait) = sized_trait { | ||
| let (mut generics, mut def_id) = |
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.
This code had a bug, that it thought the first param of an assoc item of a trait was Self (because it compared by index and not the owner def), therefore I rewrote it.
| self.current_or_prev_segment = | ||
| segments.get(resolved_segment_idx).expect("should have resolved segment"); | ||
|
|
||
| if matches!(self.path, Path::BarePath(..)) { |
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.
This optimization had to be removed since now validation can fail on non-generic paths too (AdtSelf on param default).
| *a* | ||
| ```rust | ||
| a: T |
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.
This code was erroneous, you cannot refer to Self in param default.
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.
Looks good to me, and despite many lines are being changed, I believe most of them are quite straightforward, so merging without other approvals 😅
|
changelog fixup #20329 |
Reviewing commit-by-commit is recommended.