Exclude UnusedBrokenConst from module lints
This commit is contained in:
parent
00d8fa3fdb
commit
4093bec80d
2 changed files with 5 additions and 3 deletions
|
|
@ -1360,6 +1360,7 @@ fn check_const(cx: &LateContext<'_, '_>, body_id: hir::BodyId) {
|
|||
promoted: None
|
||||
};
|
||||
// trigger the query once for all constants since that will already report the errors
|
||||
// FIXME: Use ensure here
|
||||
let _ = cx.tcx.const_eval(param_env.and(cid));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,9 +153,6 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
|
|||
|
||||
TypeAliasBounds: TypeAliasBounds,
|
||||
|
||||
// May Depend on constants elsewhere
|
||||
UnusedBrokenConst: UnusedBrokenConst,
|
||||
|
||||
TrivialConstraints: TrivialConstraints,
|
||||
TypeLimits: TypeLimits::new(),
|
||||
|
||||
|
|
@ -171,6 +168,10 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
|
|||
store.register_late_pass(sess, false, true, box BuiltinCombinedModuleLateLintPass::new());
|
||||
|
||||
late_lint_methods!(declare_combined_late_lint_pass, [BuiltinCombinedLateLintPass, [
|
||||
// FIXME: Look into regression when this is used as a module lint
|
||||
// May Depend on constants elsewhere
|
||||
UnusedBrokenConst: UnusedBrokenConst,
|
||||
|
||||
// Uses attr::is_used which is untracked, can't be an incremental module pass.
|
||||
UnusedAttributes: UnusedAttributes,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue