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

Traits generated in the Bundle derive macro can trigger warnings #15531

Open
tim-blackbird opened this issue Sep 29, 2024 · 1 comment
Open
Labels
C-Bug An unexpected or incorrect behavior D-Macros Code that generates Rust code D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@tim-blackbird
Copy link
Contributor

Bevy version

Main branch

What you did

#[derive(Bundle)]
#[deprecated]
#[allow(deprecated)] // Even with an allow the deprecation warning still shows
struct Foo {}

image

Suppressing across the entire file with #![allow(deprecated)] does work.

Additional information

I'm pretty sure derives are not supposed to throw warnings like this, maybe a bug in clippy, or perhaps using #[automatically_derived] in the macros would help?

@tim-blackbird tim-blackbird added C-Bug An unexpected or incorrect behavior D-Macros Code that generates Rust code labels Sep 29, 2024
@tim-blackbird tim-blackbird changed the title Traits generated in bundle derive macros can trigger warnings Traits generated in the Bundle derive macro can trigger warnings Sep 29, 2024
@BenjaminBrienen BenjaminBrienen added D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! labels Oct 5, 2024
@BenjaminBrienen
Copy link
Contributor

This should also have a compile test in the implementation so that the CI can detect regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior D-Macros Code that generates Rust code D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

No branches or pull requests

2 participants