Skip to content

Rust: Type inference uses defaults for type parameters #19756

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

Merged
merged 3 commits into from
Jun 16, 2025

Conversation

paldepind
Copy link
Contributor

@paldepind paldepind commented Jun 13, 2025

For instance, for a trait like this

struct GenericThing<A = bool> {
    a: A,
}

a type mention that looks like GenericThing will now resolve in the same way as GenericThing<bool>.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jun 13, 2025
@paldepind paldepind changed the title Rust: Type inference uses default for type parameters Rust: Type inference uses defaults for type parameters Jun 13, 2025
@paldepind paldepind force-pushed the rust/type-parameters-default branch from 0b6d01e to 220e837 Compare June 13, 2025 13:15
@paldepind paldepind force-pushed the rust/type-parameters-default branch from 220e837 to 8fe737c Compare June 16, 2025 07:54
@paldepind paldepind marked this pull request as ready for review June 16, 2025 08:15
@paldepind paldepind requested a review from a team as a code owner June 16, 2025 08:15
@paldepind
Copy link
Contributor Author

The CI failure is unrelated to this PR.

Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

LGTM

@paldepind paldepind merged commit fb0f12b into github:main Jun 16, 2025
16 of 17 checks passed
@paldepind paldepind deleted the rust/type-parameters-default branch June 16, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants