Skip to content
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

lint: redundant-int-cast #54

Open
DonIsaac opened this issue Nov 11, 2024 · 0 comments
Open

lint: redundant-int-cast #54

DonIsaac opened this issue Nov 11, 2024 · 0 comments
Labels
A-linter Area - linter and lint rules C-enhancement Category - New feature or request C-rule Category - Lint rule suggestion

Comments

@DonIsaac
Copy link
Owner

DonIsaac commented Nov 11, 2024

Check for @intCast from some int type T to T

const x: u32 = 1;
const y: u32 = @intCast(x);

Just ran into this when I refactored some code to use u32 instead of usize and it was still being cast in consuming code.

@DonIsaac DonIsaac added C-enhancement Category - New feature or request A-linter Area - linter and lint rules C-rule Category - Lint rule suggestion labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - linter and lint rules C-enhancement Category - New feature or request C-rule Category - Lint rule suggestion
Projects
None yet
Development

No branches or pull requests

1 participant