Skip to content

Commit c4475c7

Browse files
Access future incompatibility information directly
Avoid querying LintStore when not necessary
1 parent 7abb1fa commit c4475c7

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/librustc/lint/context.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,6 @@ impl LintStore {
203203
}
204204
}
205205

206-
pub fn future_incompatible(&self, id: LintId) -> Option<FutureIncompatibleInfo> {
207-
id.lint.future_incompatible
208-
}
209-
210206
pub fn register_group_alias(
211207
&mut self,
212208
lint_name: &'static str,

src/librustc/lint/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,8 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
672672
};
673673

674674
// Check for future incompatibility lints and issue a stronger warning.
675-
let lints = sess.lint_store.borrow();
676675
let lint_id = LintId::of(lint);
677-
let future_incompatible = lints.future_incompatible(lint_id);
676+
let future_incompatible = lint.future_incompatible;
678677

679678
// If this code originates in a foreign macro, aka something that this crate
680679
// did not itself author, then it's likely that there's nothing this crate

0 commit comments

Comments
 (0)