diff --git a/src/len_zero.rs b/src/len_zero.rs index 2c85298201f..f5ad37a71be 100644 --- a/src/len_zero.rs +++ b/src/len_zero.rs @@ -95,8 +95,8 @@ fn is_self_sig(sig: &MethodSig) -> bool { false } else { sig.decl.inputs.len() == 1 } } -fn check_cmp(cx: &LateContext, span: Span, left: &Expr, right: &Expr, op: &str) { - // check if we are in an is_empty() method +fn check_cmp(cx: &LateContext, span: Span, left: &Expr, right: &Expr, op: &str) { + // check if we are in an is_empty() method if let Some(name) = get_item_name(cx, left) { if name.as_str() == "is_empty" { return; } } diff --git a/tests/compile-fail/bit_masks.rs b/tests/compile-fail/bit_masks.rs index 0b7b31b64a5..f78012864a0 100755 --- a/tests/compile-fail/bit_masks.rs +++ b/tests/compile-fail/bit_masks.rs @@ -27,7 +27,7 @@ fn main() { x & 192 == 128; // ok, tests for bit 7 and not bit 6 x & 0xffc0 == 0xfe80; // ok - + // this also now works with constants x & THREE_BITS == 8; //~ERROR incompatible bit mask x | EVEN_MORE_REDIRECTION < 7; //~ERROR incompatible bit mask diff --git a/tests/compile-fail/cast.rs b/tests/compile-fail/cast.rs old mode 100644 new mode 100755 index b17f5de841b..70cc1919be4 --- a/tests/compile-fail/cast.rs +++ b/tests/compile-fail/cast.rs @@ -45,7 +45,7 @@ fn main() { 1usize as f32; //~ERROR casting usize to f32 causes a loss of precision (usize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide) 1isize as i32; //~ERROR casting isize to i32 may truncate the value on targets with 64-bit wide pointers 1isize as u32; //~ERROR casting isize to u32 may lose the sign of the value - //~^ERROR casting isize to u32 may truncate the value on targets with 64-bit wide pointers + //~^ERROR casting isize to u32 may truncate the value on targets with 64-bit wide pointers 1usize as u32; //~ERROR casting usize to u32 may truncate the value on targets with 64-bit wide pointers 1usize as i32; //~ERROR casting usize to i32 may truncate the value on targets with 64-bit wide pointers //~^ERROR casting usize to i32 may wrap around the value on targets with 32-bit wide pointers @@ -60,4 +60,4 @@ fn main() { 1u32 as usize; // Should not trigger any lint 1i32 as isize; // Neither should this 1i32 as usize; //~ERROR casting i32 to usize may lose the sign of the value -} \ No newline at end of file +} diff --git a/tests/compile-fail/unicode.rs b/tests/compile-fail/unicode.rs index 44bc9f1b199..e55a0390ff3 100755 --- a/tests/compile-fail/unicode.rs +++ b/tests/compile-fail/unicode.rs @@ -17,7 +17,7 @@ fn canon() { #[deny(non_ascii_literal)] fn uni() { print!("Üben!"); //~ERROR literal non-ASCII character detected - print!("\u{DC}ben!"); // this is okay + print!("\u{DC}ben!"); // this is okay } fn main() {