Skip to content

MIR dump prints the location of each statement as a comment #70400

Closed
@oli-obk

Description

@oli-obk

originally mentioned in #69916 (comment)

Basically all the lines look like

return;                          // bb2[0]: scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56

which is a lot of noise if used with mir-opt tests and diff mode, because mir optimizations that don't even touch the current statement may still cause diff fallout because they touch the comments.

Should we just stop emitting the location? Or maybe just specifically for mir-opt tests by creating a new -Z flag?

cc @nikomatsakis @pnkfelix @matthewjasper @eddyb

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-mir-optArea: MIR optimizationsA-testsuiteArea: The testsuite used to check the correctness of rustcC-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