mirror of
https://github.com/rust-lang/rust.git
synced 2026-03-31 02:54:40 +00:00
Exclude UnusedBrokenConst from module lints
This commit is contained in:
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user