Skip to content

Enable ELIDED_LIFETIMES_IN_PATHS lint in doctests for the compiler/libstd #106086

Closed
@jyn514

Description

@jyn514

We should enable https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint/builtin/static.ELIDED_LIFETIMES_IN_PATHS.html globally in rustc, I would be a fan of that change to make sure we enforce LabelText<'_> over LabelText.

rust/src/bootstrap/builder.rs

Lines 1662 to 1667 in f94c926

// When extending this list, add the new lints to the RUSTFLAGS of the
// build_bootstrap function of src/bootstrap/bootstrap.py as well as
// some code doesn't go through this `rustc` wrapper.
lint_flags.push("-Wrust_2018_idioms");
lint_flags.push("-Wunused_lifetimes");
lint_flags.push("-Wsemicolon_in_expressions_from_macros");
would be the place to add that.

Originally posted by @compiler-errors in #105975 (comment)

Metadata

Metadata

Assignees

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)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