about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-12-12 01:09:30 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-12-12 01:09:30 +0100
commit0b145d688b293a92cd855000f249d83acae53f9d (patch)
treeb63c4b986bb6aa1e93772a22163ac87bdaf009d8 /tests/ui
parentbaf5f2da8b99c23bed127912f79532eb497b3e0b (diff)
downloadrust-0b145d688b293a92cd855000f249d83acae53f9d.tar.gz
rust-0b145d688b293a92cd855000f249d83acae53f9d.zip
clone_double_ref: print reference type in lint message
changelog: clone_double_ref: print the type of the reference in lint message
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/unnecessary_clone.stderr6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/unnecessary_clone.stderr b/tests/ui/unnecessary_clone.stderr
index 5ffa6c4fd06..b908d0ce9c1 100644
--- a/tests/ui/unnecessary_clone.stderr
+++ b/tests/ui/unnecessary_clone.stderr
@@ -44,7 +44,7 @@ error: using `clone` on a `Copy` type
 LL |     Some(t).clone();
    |     ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `Some(t)`
 
-error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type
+error: using `clone` on a double-reference; this will copy the reference of type `&std::vec::Vec<i32>` instead of cloning the inner type
   --> $DIR/unnecessary_clone.rs:48:22
    |
 LL |     let z: &Vec<_> = y.clone();
@@ -66,7 +66,7 @@ error: using `clone` on a `Copy` type
 LL |         let _: E = a.clone();
    |                    ^^^^^^^^^ help: try dereferencing it: `*****a`
 
-error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type
+error: using `clone` on a double-reference; this will copy the reference of type `&[u8]` instead of cloning the inner type
   --> $DIR/unnecessary_clone.rs:89:22
    |
 LL |         let _ = &mut encoded.clone();
@@ -81,7 +81,7 @@ help: or try being explicit if you are sure, that you want to clone a reference
 LL |         let _ = &mut <&[u8]>::clone(encoded);
    |                      ^^^^^^^^^^^^^^^^^^^^^^^
 
-error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type
+error: using `clone` on a double-reference; this will copy the reference of type `&[u8]` instead of cloning the inner type
   --> $DIR/unnecessary_clone.rs:90:18
    |
 LL |         let _ = &encoded.clone();