Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Performance History

Latest Results

Support attributes and constants in self `impl Contract`s (#7580) ## Description This PR effectively re-implements self `impl Contract` implementation in order to: - properly handle attributes: - fix #7574 by `cfg_eval`ing items before adding them to the contract's interface surface and items. - add missing error-handling of invalid attributes. - take over applicable attributes and adds them to generated declarations. - add missing support for declaring `impl Contract` constants. - fix some of the existing issues: - remove cloning of all `ItemImpl`s just to check if they are self `impl Contract`s. - fix invalid double conversion of the self `impl Contract` in case of errors emitted in `handle_impl_contract`. Remaining known issues are documented in #7581. The PR also adds additional `can_annotate_...` methods to `Attribute`, e.g., `can_annotate_abi_or_trait_interface_fn`. Those methods are special cases of methods like `can_annotate_abi_or_trait_interface_item` and us such provide redundant implementation. Still, this approach is taken for cases where the `item` instance is not available or would require cloning. - Fixes #7574. ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] 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. - [ ] 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.
master
2 days ago
better error message for tuples and arrays
xunilrj/trivial-checks
2 days ago
remove sway-lib-std warnings
xunilrj/trivial-checks
4 days ago
Fix fmt issues
ironcev/fix-self-impl-contract
5 days ago
Handle attributes and add constants to self `impl Contract`s
ironcev/fix-self-impl-contract
5 days ago
better error message
xunilrj/trivial-checks
8 days ago
update tests
xunilrj/improve-asm-successor
9 days ago

Latest Branches

CodSpeed Performance Gauge
0%
Attribute for checking of trivial encoding and decoding#7575
2 days ago
e630091
xunilrj/trivial-checks
CodSpeed Performance Gauge
-11%
Support attributes and constants in self `impl Contract`s#7580
5 days ago
a62000f
ironcev/fix-self-impl-contract
CodSpeed Performance Gauge
0%
9 days ago
1327cf7
xunilrj/improve-asm-successor
© 2026 CodSpeed Technology
Home Terms Privacy Docs