Skip to content

Update canonical lints - #160

Merged
PoignardAzur merged 1 commit into
linebender:mainfrom
PoignardAzur:lint_set_9
Nov 24, 2026
Merged

PoignardAzur merged 1 commit into
linebender:mainfrom
PoignardAzur:lint_set_9

Conversation

@PoignardAzur

@PoignardAzur PoignardAzur commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explicitly allow clippy.cast_possible_truncation, because that one just keeps annoying us, and I don't think it has caught a single mistake.
Remove warn(unused_crate_dependencies); this is now handled by default with better heuristics by cargo.unused_dependencies.
Add some minor cargo lints, which already match our best practices.

Explicitly allow `clippy.cast_possible_truncation`, because that one
just keeps annoying us, and I don't think it has caught a single
mistake.
Remove `warn(unused_crate_dependencies)`; this is now handled by default
at the cargo level.
Add some minor cargo lints, which already match our best practices.

@DJMcNab DJMcNab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure, seems reasonable to me.

It isn't clear to me what the #[expect] equivalent is for the Cargo lints - do we end up needing to disable them for the whole repo?

@PoignardAzur
PoignardAzur merged commit 6154bd4 into linebender:main Nov 24, 2026
3 checks passed
@PoignardAzur

Copy link
Copy Markdown
Contributor Author

It isn't clear to me what the #[expect] equivalent is for the Cargo lints - do we end up needing to disable them for the whole repo?

Not sure what you're asking?

If the question is "How do we opt out in a child crate", we can always override the workspace value there.

PoignardAzur added a commit to linebender/xilem that referenced this pull request Nov 24, 2026
This is based on the lint set in
linebender/linebender.github.io#160

The 1.100 MSRV will be useful for adding the Never type in follow-up
PRs.
@DJMcNab

DJMcNab commented Nov 24, 2026

Copy link
Copy Markdown
Member

If the question is "How do we opt out in a child crate", we can always override the workspace value there.

Oh, I didn't realise this was possible. I thought lints.workspace was an all or nothing deal.

@PoignardAzur

Copy link
Copy Markdown
Contributor Author

Oh crap, you're right, it is.

See also: rust-lang/cargo#13157

@PoignardAzur

Copy link
Copy Markdown
Contributor Author

In our specific case, that's fine, because I don't expect use to override these lints very often at all, but still annoying.

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.

2 participants