Skip to content

Commit 16c4afb

Browse files
committed
Fix tidy errors
1 parent 217c886 commit 16c4afb

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/test/ui/lint/noop-method-call.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@ impl<T> Deref for DerefExample<T> {
2121

2222
fn main() {
2323
let foo = &Foo(1u32);
24-
let foo_clone: &Foo<u32> = foo.clone(); //~ WARNING call to method that does nothing [noop_method_call]
24+
let foo_clone: &Foo<u32> = foo.clone();
25+
//~^ WARNING call to method that does nothing [noop_method_call]
2526

2627
let bar = &Bar(1u32);
2728
let bar_clone: Bar<u32> = bar.clone();
2829

2930
let deref = &&DerefExample(12u32);
30-
let derefed: &DerefExample<u32> = deref.deref(); //~ WARNING call to method that does nothing [noop_method_call]
31+
let derefed: &DerefExample<u32> = deref.deref();
32+
//~^ WARNING call to method that does nothing [noop_method_call]
3133

3234
let deref = &DerefExample(12u32);
3335
let derefed: &u32 = deref.deref();
3436

3537
let a = &&Foo(1u32);
36-
let borrowed: &Foo<u32> = a.borrow(); //~ WARNING call to method that does nothing [noop_method_call]
38+
let borrowed: &Foo<u32> = a.borrow();
39+
//~^ WARNING call to method that does nothing [noop_method_call]
3740
}
3841

3942
fn generic<T>(foo: &Foo<T>) {

src/test/ui/lint/noop-method-call.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ LL | let foo_clone: &Foo<u32> = foo.clone();
77
= note: `#[warn(noop_method_call)]` on by default
88

99
warning: call to method that does nothing
10-
--> $DIR/noop-method-call.rs:30:39
10+
--> $DIR/noop-method-call.rs:31:39
1111
|
1212
LL | let derefed: &DerefExample<u32> = deref.deref();
1313
| ^^^^^^^^^^^^^ unnecessary method call
1414

1515
warning: call to method that does nothing
16-
--> $DIR/noop-method-call.rs:36:31
16+
--> $DIR/noop-method-call.rs:38:31
1717
|
1818
LL | let borrowed: &Foo<u32> = a.borrow();
1919
| ^^^^^^^^^^ unnecessary method call
2020

2121
warning: call to method that does nothing
22-
--> $DIR/noop-method-call.rs:44:5
22+
--> $DIR/noop-method-call.rs:47:5
2323
|
2424
LL | foo.clone();
2525
| ^^^^^^^^^^^ unnecessary method call

0 commit comments

Comments
 (0)