File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,22 @@ impl<T> Deref for DerefExample<T> {
2121
2222fn 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
3942fn generic < T > ( foo : & Foo < T > ) {
Original file line number Diff line number Diff line change @@ -7,19 +7,19 @@ LL | let foo_clone: &Foo<u32> = foo.clone();
77 = note: `#[warn(noop_method_call)]` on by default
88
99warning: call to method that does nothing
10- --> $DIR/noop-method-call.rs:30 :39
10+ --> $DIR/noop-method-call.rs:31 :39
1111 |
1212LL | let derefed: &DerefExample<u32> = deref.deref();
1313 | ^^^^^^^^^^^^^ unnecessary method call
1414
1515warning: call to method that does nothing
16- --> $DIR/noop-method-call.rs:36 :31
16+ --> $DIR/noop-method-call.rs:38 :31
1717 |
1818LL | let borrowed: &Foo<u32> = a.borrow();
1919 | ^^^^^^^^^^ unnecessary method call
2020
2121warning: call to method that does nothing
22- --> $DIR/noop-method-call.rs:44 :5
22+ --> $DIR/noop-method-call.rs:47 :5
2323 |
2424LL | foo.clone();
2525 | ^^^^^^^^^^^ unnecessary method call
You can’t perform that action at this time.
0 commit comments