about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Levick <ryan.levick@gmail.com>2021-01-08 12:09:29 +0100
committerRyan Levick <me@ryanlevick.com>2021-03-03 11:22:53 +0100
commit16c4afbde4bcc0b2471cd48cf29378d557a8f4ab (patch)
treeafcf58ebd8e091be117401b5e087eb45157d22e1
parent217c88655b1155796739edbf415e7ce37d30830b (diff)
downloadrust-16c4afbde4bcc0b2471cd48cf29378d557a8f4ab.tar.gz
rust-16c4afbde4bcc0b2471cd48cf29378d557a8f4ab.zip
Fix tidy errors
-rw-r--r--src/test/ui/lint/noop-method-call.rs9
-rw-r--r--src/test/ui/lint/noop-method-call.stderr6
2 files changed, 9 insertions, 6 deletions
diff --git a/src/test/ui/lint/noop-method-call.rs b/src/test/ui/lint/noop-method-call.rs
index b8ff75845bd..9f0ab3960f8 100644
--- a/src/test/ui/lint/noop-method-call.rs
+++ b/src/test/ui/lint/noop-method-call.rs
@@ -21,19 +21,22 @@ impl<T> Deref for DerefExample<T> {
 
 fn main() {
     let foo = &Foo(1u32);
-    let foo_clone: &Foo<u32> = foo.clone(); //~ WARNING call to method that does nothing [noop_method_call]
+    let foo_clone: &Foo<u32> = foo.clone();
+    //~^ WARNING call to method that does nothing [noop_method_call]
 
     let bar = &Bar(1u32);
     let bar_clone: Bar<u32> = bar.clone();
 
     let deref = &&DerefExample(12u32);
-    let derefed: &DerefExample<u32> = deref.deref(); //~ WARNING call to method that does nothing [noop_method_call]
+    let derefed: &DerefExample<u32> = deref.deref();
+    //~^ WARNING call to method that does nothing [noop_method_call]
 
     let deref = &DerefExample(12u32);
     let derefed: &u32 = deref.deref();
 
     let a = &&Foo(1u32);
-    let borrowed: &Foo<u32> = a.borrow(); //~ WARNING call to method that does nothing [noop_method_call]
+    let borrowed: &Foo<u32> = a.borrow();
+    //~^ WARNING call to method that does nothing [noop_method_call]
 }
 
 fn generic<T>(foo: &Foo<T>) {
diff --git a/src/test/ui/lint/noop-method-call.stderr b/src/test/ui/lint/noop-method-call.stderr
index f5b766f4233..32acf163233 100644
--- a/src/test/ui/lint/noop-method-call.stderr
+++ b/src/test/ui/lint/noop-method-call.stderr
@@ -7,19 +7,19 @@ LL |     let foo_clone: &Foo<u32> = foo.clone();
    = note: `#[warn(noop_method_call)]` on by default
 
 warning: call to method that does nothing
-  --> $DIR/noop-method-call.rs:30:39
+  --> $DIR/noop-method-call.rs:31:39
    |
 LL |     let derefed: &DerefExample<u32> = deref.deref();
    |                                       ^^^^^^^^^^^^^ unnecessary method call
 
 warning: call to method that does nothing
-  --> $DIR/noop-method-call.rs:36:31
+  --> $DIR/noop-method-call.rs:38:31
    |
 LL |     let borrowed: &Foo<u32> = a.borrow();
    |                               ^^^^^^^^^^ unnecessary method call
 
 warning: call to method that does nothing
-  --> $DIR/noop-method-call.rs:44:5
+  --> $DIR/noop-method-call.rs:47:5
    |
 LL |     foo.clone();
    |     ^^^^^^^^^^^ unnecessary method call