Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix latest nightly breakage #2681

Merged
merged 1 commit into from
Apr 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ fn is_ref_iterable_type(cx: &LateContext, e: &Expr) -> bool {
fn is_iterable_array(ty: Ty) -> bool {
// IntoIterator is currently only implemented for array sizes <= 32 in rustc
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,
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern crate clippy_lints;

#[plugin_registrar]
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() {
if lint == "clippy" {
reg.sess
Expand All @@ -21,7 +21,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
return;
}
}
}
});

clippy_lints::register_plugins(reg);
}
Expand Down