Skip to content

Commit 7df8723

Browse files
committed
fix(upstream): box register_late_lint closure
1 parent d12e868 commit 7df8723

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,25 +115,25 @@ impl Callbacks for MyCallbacks {
115115
hir_lints::not_using_prelude::NOT_USING_PRELUDE,
116116
]);
117117

118-
lint_store.register_late_pass(|tcx| {
118+
lint_store.register_late_pass(Box::new(|tcx| {
119119
Box::new(hir_lints::c_str_literal::CStrLiteralLint {
120120
cx: driver::cx::<MyCallbacks>(tcx),
121121
})
122-
});
122+
}));
123123

124-
lint_store.register_late_pass(|tcx| {
124+
lint_store.register_late_pass(Box::new(|tcx| {
125125
Box::new(hir_lints::not_using_prelude::NotUsingPrelude {
126126
cx: driver::cx::<MyCallbacks>(tcx),
127127
})
128-
});
128+
}));
129129

130130
// lint_store
131-
// .register_late_pass(|_| Box::new(infallible_allocation::InfallibleAllocation));
132-
lint_store.register_late_pass(|tcx| {
131+
// .register_late_pass(Box::new(|_| Box::new(infallible_allocation::InfallibleAllocation)));
132+
lint_store.register_late_pass(Box::new(|tcx| {
133133
Box::new(atomic_context::AtomicContext {
134134
cx: driver::cx::<MyCallbacks>(tcx),
135135
})
136-
});
136+
}));
137137
}));
138138
}
139139

0 commit comments

Comments
 (0)