Skip to content
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

Constructing PatType #1554

Closed
nearest-river opened this issue Dec 24, 2023 · 1 comment · Fixed by #1573
Closed

Constructing PatType #1554

nearest-river opened this issue Dec 24, 2023 · 1 comment · Fixed by #1573

Comments

@nearest-river
Copy link

nearest-river commented Dec 24, 2023

Is it possible to construct a PatType manually..

something like

let pat_type: PatType=quote! { ptr: usize }.into();
@dtolnay
Copy link
Owner

dtolnay commented Jan 1, 2024

I added a way in 2.0.45.

let pat: PatType = parse_quote! { ptr: usize };

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 a pull request may close this issue.

2 participants