Skip to content

-Ztime-passes: print lint name #79953

Open
@matthiaskrgr

Description

@matthiaskrgr

It seems that for each lint that is run, rustc only prints pre_AST_expansion_lint_checks when invoked with -Ztime-passes:

fn pre_expansion_lint(sess: &Session, lint_store: &LintStore, krate: &ast::Crate) {
    sess.time("pre_AST_expansion_lint_checks", || {
        rustc_lint::check_ast_crate(
            sess,
            lint_store,
            &krate,
            true,
            None,
            rustc_lint::BuiltinCombinedPreExpansionLintPass::new(),
        );
    });
}
time: 0.000; rss: 62MB	plugin_registration
time: 0.000; rss: 62MB	pre_AST_expansion_lint_checks
time: 0.000; rss: 65MB	crate_injection
time: 0.000; rss: 65MB	pre_AST_expansion_lint_checks
time: 0.000; rss: 65MB	pre_AST_expansion_lint_checks
time: 0.001; rss: 68MB	pre_AST_expansion_lint_checks
time: 0.000; rss: 69MB	pre_AST_expansion_lint_checks
time: 0.000; rss: 69MB	pre_AST_expansion_lint_checks
....

It would be great if it could print the name of the lint here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-self-profileArea: Self-profiling feature of the compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.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