Skip to content

Rust: type inference: more pattern matching tests #8

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

aibaars
Copy link

@aibaars aibaars commented Jul 11, 2025

Thanks to co-pilot for generating the examples.
I just asked co-pilot to generate sample test code that covers all the cases for Pat from the ungrammar.

I had to drop the sample code about "const block patterns" because that feature has been removed from Rust.

println!("Boxed 100");
}
box x => {
let unboxed = x; // $ MISSING: type=unboxed:i32
Copy link
Author

@aibaars aibaars Jul 11, 2025

Choose a reason for hiding this comment

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

@hvitved Box patterns are probably not very often used, but it might be easy enough to just add support for them. All other new MISSING annotations are related to tuples, slices and arrays.

Thanks to co-pilot for generating the examples
@aibaars aibaars force-pushed the aibaars/more-pattern-tests branch from 4ffba73 to 5f091fa Compare July 11, 2025 10:10
@aibaars aibaars marked this pull request as ready for review July 11, 2025 10:18
@aibaars aibaars closed this Jul 11, 2025
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.

1 participant