Skip to content

Commit 4093bec

Browse files
committed
Exclude UnusedBrokenConst from module lints
1 parent 00d8fa3 commit 4093bec

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/librustc_lint/builtin.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@ fn check_const(cx: &LateContext<'_, '_>, body_id: hir::BodyId) {
13601360
promoted: None
13611361
};
13621362
// trigger the query once for all constants since that will already report the errors
1363+
// FIXME: Use ensure here
13631364
let _ = cx.tcx.const_eval(param_env.and(cid));
13641365
}
13651366

src/librustc_lint/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
153153

154154
TypeAliasBounds: TypeAliasBounds,
155155

156-
// May Depend on constants elsewhere
157-
UnusedBrokenConst: UnusedBrokenConst,
158-
159156
TrivialConstraints: TrivialConstraints,
160157
TypeLimits: TypeLimits::new(),
161158

@@ -171,6 +168,10 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
171168
store.register_late_pass(sess, false, true, box BuiltinCombinedModuleLateLintPass::new());
172169

173170
late_lint_methods!(declare_combined_late_lint_pass, [BuiltinCombinedLateLintPass, [
171+
// FIXME: Look into regression when this is used as a module lint
172+
// May Depend on constants elsewhere
173+
UnusedBrokenConst: UnusedBrokenConst,
174+
174175
// Uses attr::is_used which is untracked, can't be an incremental module pass.
175176
UnusedAttributes: UnusedAttributes,
176177

0 commit comments

Comments
 (0)