Skip to content

Commit 475959d

Browse files
authored
Merge pull request #2681 from phansch/fix_latest_nightly_breakage
Fix latest nightly breakage
2 parents f84cc2c + a854874 commit 475959d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern crate clippy_lints;
1212

1313
#[plugin_registrar]
1414
pub fn plugin_registrar(reg: &mut Registry) {
15-
if let Ok(lint_store) = reg.sess.lint_store.try_borrow() {
15+
reg.sess.lint_store.with_read_lock(|lint_store| {
1616
for (lint, _, _) in lint_store.get_lint_groups() {
1717
if lint == "clippy" {
1818
reg.sess
@@ -21,7 +21,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
2121
return;
2222
}
2323
}
24-
}
24+
});
2525

2626
clippy_lints::register_plugins(reg);
2727
}

0 commit comments

Comments
 (0)