fix various rustup failures
This commit is contained in:
parent
7c94a62048
commit
6d921b4734
@ -108,7 +108,7 @@ fn check_block(&mut self, cx: &LateContext<'a, 'tcx>, block: &'tcx hir::Block) {
|
||||
cond=snippet(cx, cond.span, "_"),
|
||||
then=if then.stmts.len() > 1 { " ..;" } else { "" },
|
||||
else=if default_multi_stmts { " ..;" } else { "" },
|
||||
value=snippet(cx, then.span, "<value>"),
|
||||
value=snippet(cx, value.span, "<value>"),
|
||||
default=snippet(cx, default.span, "<default>"),
|
||||
);
|
||||
span_lint_and_then(cx,
|
||||
|
@ -357,6 +357,9 @@ pub fn method_chain_args<'a>(expr: &'a Expr, methods: &[&str]) -> Option<Vec<&'a
|
||||
// method chains are stored last -> first
|
||||
if let ExprMethodCall(ref name, _, ref args) = current.node {
|
||||
if name.node == *method_name {
|
||||
if args.iter().any(|e| in_macro(e.span)) {
|
||||
return None;
|
||||
}
|
||||
matched.push(&**args); // build up `matched` backwards
|
||||
current = &args[0] // go to parent expression
|
||||
} else {
|
||||
|
@ -20,13 +20,12 @@ fn main() {
|
||||
lazy_static! {
|
||||
static ref MUT_MAP : HashMap<usize, &'static str> = {
|
||||
let mut m = HashMap::new();
|
||||
let mut zero = &mut &mut "zero";
|
||||
m.insert(0, "zero");
|
||||
m
|
||||
};
|
||||
static ref MUT_COUNT : usize = MUT_MAP.len();
|
||||
}
|
||||
assert!(*MUT_COUNT == 1);
|
||||
assert_eq!(*MUT_COUNT, 1);
|
||||
// FIXME: don't lint in array length, requires `check_body`
|
||||
//let _ = [""; (42.0 < std::f32::NAN) as usize];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user