Skip to content

Conversation

@ChayimFriedman2
Copy link
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
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
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
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
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.

Copy link
Member

@ShoyuVanilla ShoyuVanilla left a 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 😅

@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
Copy link
Member

lnicola commented Oct 24, 2025

changelog fixup #20329

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