-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Diagnostics for label traits #17441
base: main
Are you sure you want to change the base?
Diagnostics for label traits #17441
Conversation
8d15c0c
to
7377d85
Compare
Looks like CI is mad about the attribute. What's different vs the existing usages? |
@LikeLakers2 Would you happen to know what the correct formulation for the expect & allow attribute here is? I though I found a workaround by putting the trait impl into a module inside a |
8ce731c
to
7377d85
Compare
@SpecificProtagonist I'm not actually sure what the solution for this would be. See, those lint attributes should be applying, but rustc clearly isn't applying them as we expect. Normally, my next step would be to move the lint attributes up a level. For example, if I have a module, and inside that module is a struct that I'm trying to place those lint attributes on... then I move those lint attributes to apply to the entire module. Only problem is, there's not exactly an encapsulating item here... So you'd probably have to make an encapsulating item here. But you seem to have tried that - and I don't know how to fix it otherwise without causing some churn. If you're okay with some churn, here's a couple ideas:
Otherwise, I might suggest giving up on this until |
Thanks! I'm going with the last option of removing the |
Objective
Diagnostics for labels don't suggest how to best implement them.
Solution
diagnostics::on_unimplemented
anddiagnostics::do_not_recommend
Showcase
New error message: