Skip to content

-Zvalidate-mir: check that all referenced locals exist #73356

Closed
@jonas-schievink

Description

@jonas-schievink

When encountering a Local, there must be a corresponding LocalDecl in the MIR body. If there isn't, later passes can panic due to indexing out of bounds of the LocalDecl array. The validation pass could detect this problem earlier.

Metadata

Metadata

Assignees

Labels

A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions