mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
Fix latest nightly breakage
I'm not sure if there are better ways to use the RwLock API, though. But it seems to work.
This commit is contained in:
parent
0c665f4a31
commit
a854874e6a
@ -1798,7 +1798,7 @@ fn is_ref_iterable_type(cx: &LateContext, e: &Expr) -> bool {
|
|||||||
fn is_iterable_array(ty: Ty) -> bool {
|
fn is_iterable_array(ty: Ty) -> bool {
|
||||||
// IntoIterator is currently only implemented for array sizes <= 32 in rustc
|
// IntoIterator is currently only implemented for array sizes <= 32 in rustc
|
||||||
match ty.sty {
|
match ty.sty {
|
||||||
ty::TyArray(_, n) => (0..=32).contains(n.val.to_raw_bits().expect("array length")),
|
ty::TyArray(_, n) => (0..=32).contains(&n.val.to_raw_bits().expect("array length")),
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ extern crate clippy_lints;
|
|||||||
|
|
||||||
#[plugin_registrar]
|
#[plugin_registrar]
|
||||||
pub fn plugin_registrar(reg: &mut Registry) {
|
pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
if let Ok(lint_store) = reg.sess.lint_store.try_borrow() {
|
reg.sess.lint_store.with_read_lock(|lint_store| {
|
||||||
for (lint, _, _) in lint_store.get_lint_groups() {
|
for (lint, _, _) in lint_store.get_lint_groups() {
|
||||||
if lint == "clippy" {
|
if lint == "clippy" {
|
||||||
reg.sess
|
reg.sess
|
||||||
@ -21,7 +21,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
clippy_lints::register_plugins(reg);
|
clippy_lints::register_plugins(reg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user