-
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
Fully implement #[deprecated]
attribute
#6942
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler
General compiler. Should eventually become more specific as the issue is triaged
team:compiler
Compiler Team
Comments
IGI-111
added a commit
that referenced
this issue
Feb 20, 2025
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.
IGI-111
added a commit
that referenced
this issue
Feb 20, 2025
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.
IGI-111
added a commit
that referenced
this issue
Feb 20, 2025
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.
IGI-111
added a commit
that referenced
this issue
Feb 24, 2025
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.
IGI-111
added a commit
that referenced
this issue
Feb 24, 2025
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.
IGI-111
added a commit
that referenced
this issue
Feb 24, 2025
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.
ironcev
pushed a commit
that referenced
this issue
Feb 25, 2025
## 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 - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler
General compiler. Should eventually become more specific as the issue is triaged
team:compiler
Compiler Team
Currently, only structs can be marked as
#[deprecated]
and the warning for using deprecated structs will not be emitted for all expressions in which a struct can be used.Since we do not emit any error or warning for using
#[deprecated]
aside of stucts, this leads to a misleading usage, where items are annotated as#[depricated]
but that annotation does not have any effect.E.g., some examples of using
#[deprecated]
without any effect in the standard library:std::constants::ZERO_B256
std::ecr::ec_recover
std::evm::ecr::ec_recover_evm_address
Warning for usages of
#[deprecated]
outside of struct declarations will be done in #6880.This issues calls for step-wise implementation of
#[deprecated]
in the following directions:#[deprecated]
this should deprecated all the items in that module. Same is with deprecating, e.g.,impl
s.The text was updated successfully, but these errors were encountered: