-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Extend #[deprecated]
support
#6944
base: master
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #6944 will not alter performanceComparing Summary
|
9b557d5
to
5be38d1
Compare
Add support for the `#[deprecated]` attribute to functions, enums, struct items, enum variants and propagate deprecation check exhaustively throughout expressions variants. Partially addresses #6942. Support for deprecating traits, abis and the methods thereof in their definitions is still missing, as well as scrutinees and storage fields.
5be38d1
to
698fc62
Compare
| | ||
219 | #[deprecated(note = "std::ecr has been replaced by std::crypto, and is no longer maintained")] | ||
220 | pub fn ec_recover_address(signature: B512, msg_hash: b256) -> Result<Address, EcRecoverError> { | ||
221 | let pub_key_result = ec_recover(signature, msg_hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that std
compiles with warnings. And it is essentially a deprecated function calling another deprecated function from the same module.
Adding #[allow(deprecated)]
on all those functions next to the #[deprecated]
will remove this issue. They will still be deprecated for all other usages, but will allow calling other deprecated functions from the same module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't dig into it but if those are indeed deprecated functions calling each other I agree. Will fix.
Description
Add support for the
#[deprecated]
attribute to functions, enums, struct items, enum variants and propagate deprecation check exhaustively throughout expressions variants.Partially addresses #6942.
Support for deprecating traits, abis and the methods thereof in their definitions is still missing, as well as scrutinees and storage fields.
Checklist
Breaking*
orNew Feature
labels where relevant.