Skip to content

Conversation

@xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Sep 16, 2025

Description

Continuation of #6860.

The summary of removed todo!() are:
1 - Some todo!() are actually unreachable. In future PRs I will try to model the AST better and remove these match arms;
2 - Some are trivial impls like spans;
3 - Some are trivial from traits like PartialEq and PartialOrd.

Others will be removed in future PRs.

Checklist

  • I have linked to any relevant issues.
  • 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).
  • 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.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@xunilrj xunilrj self-assigned this Sep 16, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 16, 2025

CodSpeed Performance Report

Merging #7391 will not alter performance

Comparing xunilrj/removing-todo-const-generics (3d7b1a1) with master (3c6f718)

Summary

✅ 25 untouched

@xunilrj xunilrj force-pushed the xunilrj/removing-todo-const-generics branch from 27cbf5a to 8282f12 Compare September 25, 2025 18:33
@xunilrj xunilrj marked this pull request as ready for review September 25, 2025 19:03
@xunilrj xunilrj requested review from a team as code owners September 25, 2025 19:03
IGI-111
IGI-111 previously approved these changes Sep 26, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@xunilrj xunilrj requested a review from ironcev October 7, 2025 23:35
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the unwrap issue! can we remove the remaining unwraps i've pointed out as well? Thanks

@xunilrj
Copy link
Contributor Author

xunilrj commented Oct 9, 2025

Thanks for addressing the unwrap issue! can we remove the remaining unwraps i've pointed out as well? Thanks

I created another PR to better address these unwrap. #7453
I still suggest that we merge this one first. As the other touches in a lot of more files.

@xunilrj xunilrj dismissed JoshuaBatty’s stale review October 9, 2025 13:49

Suggestions will be implemented by another PR.

@xunilrj xunilrj enabled auto-merge (squash) October 9, 2025 23:55
@xunilrj xunilrj merged commit a4da6ee into master Oct 10, 2025
47 checks passed
@xunilrj xunilrj deleted the xunilrj/removing-todo-const-generics branch October 10, 2025 00:07
xunilrj added a commit that referenced this pull request Oct 20, 2025
## Description

This PR is a continuation of #7391.
It also changes from `GenericArgument` to `GenericTypeArgument`.

The rationale is that `GenericArgument` should only be used where we can
have types and const generics. And it a lot of cases, we only accept
types.

## 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.
- [ ] 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.
@xunilrj xunilrj mentioned this pull request Oct 29, 2025
8 tasks
xunilrj added a commit that referenced this pull request Nov 5, 2025
## Description

This PR continue #7391. 

First, it removes some easy `todo!()` around `ParsedDeclId`. It seems
only `fn` or `struct` are using those. But I decided to implement them
anyway to keep the code uniform. We may be able to simplify this, I
think.

Second, it implements coin analysis for const generics. Unfortunately,
the analysis runs on the `fn` declaration and not on the materialised
version. So even calling a function with `0` generates the error.

## Checklist

- [x] I have linked to any relevant issues.
- [ ] 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants