Skip to content

Commit

Permalink
Auto merge of rust-lang#101577 - Dylan-DPC:rollup-l9xw7i7, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - rust-lang#98933 (Opaque types' generic params do not imply anything about their hidden type's lifetimes)
 - rust-lang#101041 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2)
 - rust-lang#101424 (Adjust and slightly generalize operator error suggestion)
 - rust-lang#101496 (Allow lower_lifetime_binder receive a closure)
 - rust-lang#101501 (Allow lint passes to be bound by `TyCtxt`)
 - rust-lang#101515 (Recover from typo where == is used in place of =)
 - rust-lang#101545 (Remove unnecessary `PartialOrd` and `Ord`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Sep 8, 2022
2 parents 30a5815 + 9faa588 commit f47a1e2
Show file tree
Hide file tree
Showing 2 changed files with 211 additions and 209 deletions.
6 changes: 4 additions & 2 deletions clippy_dev/src/new_lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,17 @@ fn add_lint(lint: &LintData<'_>, enable_msrv: bool) -> io::Result<()> {

let new_lint = if enable_msrv {
format!(
"store.register_{lint_pass}_pass(move || Box::new({module_name}::{camel_name}::new(msrv)));\n ",
"store.register_{lint_pass}_pass(move |{ctor_arg}| Box::new({module_name}::{camel_name}::new(msrv)));\n ",
lint_pass = lint.pass,
ctor_arg = if lint.pass == "late" { "_" } else { "" },
module_name = lint.name,
camel_name = to_camel_case(lint.name),
)
} else {
format!(
"store.register_{lint_pass}_pass(|| Box::new({module_name}::{camel_name}));\n ",
"store.register_{lint_pass}_pass(|{ctor_arg}| Box::new({module_name}::{camel_name}));\n ",
lint_pass = lint.pass,
ctor_arg = if lint.pass == "late" { "_" } else { "" },
module_name = lint.name,
camel_name = to_camel_case(lint.name),
)
Expand Down
Loading

0 comments on commit f47a1e2

Please sign in to comment.