Skip to content

Conversation

Shunpoco
Copy link
Contributor

@Shunpoco Shunpoco commented Oct 19, 2025

Context

This PR continues from #138679 (comment).
In the last PR, I introduced typeck result's tainted_by_error in check_pat. But as Oli commented, I should put the check to a better place which all lints get benefit from the check.

Change

Since visit_nested_body in late.rs is the starting point of linting for a nested body, I moved the error check to the function.
I also rename one ui test case which I introduced in the last PR. I think the new name describes what the test wants to check more.

This PR fixes #138361 .

…rror

We started to check typeck result's tainted_by_errors in check_pat for LateLint,
But ideally the check should be in a better place which all lints profit from it.
visit_nested_body is the place because it's the starting point of linting body.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 19, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Shunpoco Shunpoco force-pushed the lint-check-tainted-error branch from 4d84ca4 to 34be164 Compare October 19, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: sty: None

3 participants