all: remove trailing spaces
This commit is contained in:
parent
15e3774cb4
commit
e8f875813d
@ -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; }
|
||||
}
|
||||
|
@ -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
|
||||
|
4
tests/compile-fail/cast.rs
Normal file → Executable file
4
tests/compile-fail/cast.rs
Normal file → Executable file
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user