about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/cognitive_complexity.rs18
-rw-r--r--tests/ui/cognitive_complexity.stderr8
-rw-r--r--tests/ui/dlist.rs2
-rw-r--r--tests/ui/dlist.stderr6
-rw-r--r--tests/ui/if_same_then_else.rs4
-rw-r--r--tests/ui/if_same_then_else.stderr4
-rw-r--r--tests/ui/unused_io_amount.rs4
-rw-r--r--tests/ui/unused_io_amount.stderr8
8 files changed, 27 insertions, 27 deletions
diff --git a/tests/ui/cognitive_complexity.rs b/tests/ui/cognitive_complexity.rs
index 4e4016e78c2..a1f1c586eb0 100644
--- a/tests/ui/cognitive_complexity.rs
+++ b/tests/ui/cognitive_complexity.rs
@@ -313,7 +313,7 @@ fn mcarton_sees_all() {
 }
 
 #[clippy::cognitive_complexity = "0"]
-fn try() -> Result<i32, &'static str> {
+fn try_() -> Result<i32, &'static str> {
     match 5 {
         5 => Ok(5),
         _ => return Err("bla"),
@@ -322,14 +322,14 @@ fn try() -> Result<i32, &'static str> {
 
 #[clippy::cognitive_complexity = "0"]
 fn try_again() -> Result<i32, &'static str> {
-    let _ = try!(Ok(42));
-    let _ = try!(Ok(43));
-    let _ = try!(Ok(44));
-    let _ = try!(Ok(45));
-    let _ = try!(Ok(46));
-    let _ = try!(Ok(47));
-    let _ = try!(Ok(48));
-    let _ = try!(Ok(49));
+    let _ = r#try!(Ok(42));
+    let _ = r#try!(Ok(43));
+    let _ = r#try!(Ok(44));
+    let _ = r#try!(Ok(45));
+    let _ = r#try!(Ok(46));
+    let _ = r#try!(Ok(47));
+    let _ = r#try!(Ok(48));
+    let _ = r#try!(Ok(49));
     match 5 {
         5 => Ok(5),
         _ => return Err("bla"),
diff --git a/tests/ui/cognitive_complexity.stderr b/tests/ui/cognitive_complexity.stderr
index 168653b9711..e1c5863f494 100644
--- a/tests/ui/cognitive_complexity.stderr
+++ b/tests/ui/cognitive_complexity.stderr
@@ -216,7 +216,7 @@ LL | | }
 error: the function has a cognitive complexity of 1
   --> $DIR/cognitive_complexity.rs:316:1
    |
-LL | / fn try() -> Result<i32, &'static str> {
+LL | / fn try_() -> Result<i32, &'static str> {
 LL | |     match 5 {
 LL | |         5 => Ok(5),
 LL | |         _ => return Err("bla"),
@@ -230,9 +230,9 @@ error: the function has a cognitive complexity of 1
   --> $DIR/cognitive_complexity.rs:324:1
    |
 LL | / fn try_again() -> Result<i32, &'static str> {
-LL | |     let _ = try!(Ok(42));
-LL | |     let _ = try!(Ok(43));
-LL | |     let _ = try!(Ok(44));
+LL | |     let _ = r#try!(Ok(42));
+LL | |     let _ = r#try!(Ok(43));
+LL | |     let _ = r#try!(Ok(44));
 ...  |
 LL | |     }
 LL | | }
diff --git a/tests/ui/dlist.rs b/tests/ui/dlist.rs
index 5af79f9c58e..2940d2d2901 100644
--- a/tests/ui/dlist.rs
+++ b/tests/ui/dlist.rs
@@ -7,7 +7,7 @@ use alloc::collections::linked_list::LinkedList;
 
 trait Foo {
     type Baz = LinkedList<u8>;
-    fn foo(LinkedList<u8>);
+    fn foo(_: LinkedList<u8>);
     const BAR: Option<LinkedList<u8>>;
 }
 
diff --git a/tests/ui/dlist.stderr b/tests/ui/dlist.stderr
index e4712e5d07f..1f6646ec9ad 100644
--- a/tests/ui/dlist.stderr
+++ b/tests/ui/dlist.stderr
@@ -8,10 +8,10 @@ LL |     type Baz = LinkedList<u8>;
    = help: a VecDeque might work
 
 error: I see you're using a LinkedList! Perhaps you meant some other data structure?
-  --> $DIR/dlist.rs:10:12
+  --> $DIR/dlist.rs:10:15
    |
-LL |     fn foo(LinkedList<u8>);
-   |            ^^^^^^^^^^^^^^
+LL |     fn foo(_: LinkedList<u8>);
+   |               ^^^^^^^^^^^^^^
    |
    = help: a VecDeque might work
 
diff --git a/tests/ui/if_same_then_else.rs b/tests/ui/if_same_then_else.rs
index d1213e5e5fd..f9923c9bb48 100644
--- a/tests/ui/if_same_then_else.rs
+++ b/tests/ui/if_same_then_else.rs
@@ -215,10 +215,10 @@ fn if_same_then_else() -> Result<&'static str, ()> {
     };
 
     if true {
-        try!(Ok("foo"));
+        r#try!(Ok("foo"));
     } else {
         //~ ERROR same body as `if` block
-        try!(Ok("foo"));
+        r#try!(Ok("foo"));
     }
 
     if true {
diff --git a/tests/ui/if_same_then_else.stderr b/tests/ui/if_same_then_else.stderr
index fa42afff0be..f1710382bfa 100644
--- a/tests/ui/if_same_then_else.stderr
+++ b/tests/ui/if_same_then_else.stderr
@@ -197,7 +197,7 @@ error: this `if` has identical blocks
 LL |       } else {
    |  ____________^
 LL | |         //~ ERROR same body as `if` block
-LL | |         try!(Ok("foo"));
+LL | |         r#try!(Ok("foo"));
 LL | |     }
    | |_____^
    |
@@ -206,7 +206,7 @@ note: same as this
    |
 LL |       if true {
    |  _____________^
-LL | |         try!(Ok("foo"));
+LL | |         r#try!(Ok("foo"));
 LL | |     } else {
    | |_____^
 
diff --git a/tests/ui/unused_io_amount.rs b/tests/ui/unused_io_amount.rs
index c8a38f9fe57..40968822493 100644
--- a/tests/ui/unused_io_amount.rs
+++ b/tests/ui/unused_io_amount.rs
@@ -4,9 +4,9 @@
 use std::io;
 
 fn try_macro<T: io::Read + io::Write>(s: &mut T) -> io::Result<()> {
-    try!(s.write(b"test"));
+    r#try!(s.write(b"test"));
     let mut buf = [0u8; 4];
-    try!(s.read(&mut buf));
+    r#try!(s.read(&mut buf));
     Ok(())
 }
 
diff --git a/tests/ui/unused_io_amount.stderr b/tests/ui/unused_io_amount.stderr
index 2d00338193c..dbf701e06f9 100644
--- a/tests/ui/unused_io_amount.stderr
+++ b/tests/ui/unused_io_amount.stderr
@@ -1,8 +1,8 @@
 error: handle written amount returned or use `Write::write_all` instead
   --> $DIR/unused_io_amount.rs:7:5
    |
-LL |     try!(s.write(b"test"));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+LL |     r#try!(s.write(b"test"));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D clippy::unused-io-amount` implied by `-D warnings`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
@@ -10,8 +10,8 @@ LL |     try!(s.write(b"test"));
 error: handle read amount returned or use `Read::read_exact` instead
   --> $DIR/unused_io_amount.rs:9:5
    |
-LL |     try!(s.read(&mut buf));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+LL |     r#try!(s.read(&mut buf));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)