Skip to content

Avoid linting unreachable_code on todo!()#3928

Open
llogiq wants to merge 2 commits intorust-lang:masterfrom
llogiq:todo-overreach
Open

Avoid linting unreachable_code on todo!()#3928
llogiq wants to merge 2 commits intorust-lang:masterfrom
llogiq:todo-overreach

Conversation

@llogiq
Copy link
Contributor

@llogiq llogiq commented Mar 14, 2026

Because todo!() is often used as a placeholder while working on the code, we should avoid linting unreachable_code on code after those macro uses. Instead let's add a todo_macro_uses lint that we can selectively activate e.g. when compiling a release.

This will reduce message churn and allow users to concentrate on the warnings and errors that matter while they work on the code.

Rendered

@llogiq
Copy link
Contributor Author

llogiq commented Mar 14, 2026

Note that rust#149543 has an implementation.

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.

1 participant