Skip to content

Migrate more stuff to the next solver#20841

Merged
ShoyuVanilla merged 6 commits into
rust-lang:masterfrom
ChayimFriedman2:to-ns
Oct 19, 2025
Merged

Migrate more stuff to the next solver#20841
ShoyuVanilla merged 6 commits into
rust-lang:masterfrom
ChayimFriedman2:to-ns

Conversation

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

Reviewing commit-by-commit is recommended.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2025
),
};
// if the arg is error like, render it to inform the user
if is_err(arg) {

Copy link
Copy Markdown
Contributor Author

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) =

Copy link
Copy Markdown
Contributor Author

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(..)) {

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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.

@ShoyuVanilla ShoyuVanilla left a comment

Copy link
Copy Markdown
Member

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 😅

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Oct 19, 2025
Merged via the queue into rust-lang:master with commit cd2bcd6 Oct 19, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2025
@ChayimFriedman2 ChayimFriedman2 deleted the to-ns branch October 19, 2025 18:11
@lnicola

lnicola commented Oct 24, 2025

Copy link
Copy Markdown
Member

changelog fixup #20329

mendelsshop pushed a commit to mendelsshop/rust-analyzer that referenced this pull request Oct 27, 2025
Migrate more stuff to the next solver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants