Skip to content

macros: avoid trivial cast in #[quickcheck] expansion - #352

Open
rome-xi wants to merge 1 commit into
BurntSushi:masterfrom
rome-xi:contrib/quickcheck-261
Open

macros: avoid trivial cast in #[quickcheck] expansion#352
rome-xi wants to merge 1 commit into
BurntSushi:masterfrom
rome-xi:contrib/quickcheck-261

Conversation

@rome-xi

@rome-xi rome-xi commented Aug 24, 2026

Copy link
Copy Markdown

Closes #261.

#[quickcheck] expanded fn_item as fn(..) which trips trivial_casts when the attribute is applied inside macro_rules that substitutes a type. Coerce through a let binding instead of as, and add a regression test that denies trivial_casts.

Signed-off-by: rome-xi <rome-xi@users.noreply.github.com>
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.

Trivial cast error when using #[quickcheck] inside macro

1 participant