]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/dereference.stderr
iterate List by value
[rust.git] / tests / ui / dereference.stderr
index 7e10add40b180e2ffd73788a4694836760af80b8..d26b462a4336236b79472bc5dd8b001f99c08473 100644 (file)
@@ -1,46 +1,70 @@
 error: explicit deref method call
-  --> $DIR/dereference.rs:19:19
+  --> $DIR/dereference.rs:30:19
    |
 LL |     let b: &str = a.deref();
    |                   ^^^^^^^^^ help: try this: `&*a`
    |
-   = note: `-D clippy::explicit-deref-method` implied by `-D warnings`
+   = note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
 
 error: explicit deref_mut method call
-  --> $DIR/dereference.rs:21:23
+  --> $DIR/dereference.rs:32:23
    |
 LL |     let b: &mut str = a.deref_mut();
    |                       ^^^^^^^^^^^^^ help: try this: `&mut *a`
 
 error: explicit deref method call
-  --> $DIR/dereference.rs:24:39
+  --> $DIR/dereference.rs:35:39
    |
 LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
    |                                       ^^^^^^^^^ help: try this: `&*a`
 
 error: explicit deref method call
-  --> $DIR/dereference.rs:24:50
+  --> $DIR/dereference.rs:35:50
    |
 LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
    |                                                  ^^^^^^^^^ help: try this: `&*a`
 
 error: explicit deref method call
-  --> $DIR/dereference.rs:26:20
+  --> $DIR/dereference.rs:37:20
    |
 LL |     println!("{}", a.deref());
    |                    ^^^^^^^^^ help: try this: `&*a`
 
 error: explicit deref method call
-  --> $DIR/dereference.rs:29:11
+  --> $DIR/dereference.rs:40:11
    |
 LL |     match a.deref() {
    |           ^^^^^^^^^ help: try this: `&*a`
 
 error: explicit deref method call
-  --> $DIR/dereference.rs:33:28
+  --> $DIR/dereference.rs:44:28
    |
 LL |     let b: String = concat(a.deref());
    |                            ^^^^^^^^^ help: try this: `&*a`
 
-error: aborting due to 7 previous errors
+error: explicit deref method call
+  --> $DIR/dereference.rs:46:13
+   |
+LL |     let b = just_return(a).deref();
+   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*just_return(a)`
+
+error: explicit deref method call
+  --> $DIR/dereference.rs:48:28
+   |
+LL |     let b: String = concat(just_return(a).deref());
+   |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*just_return(a)`
+
+error: explicit deref method call
+  --> $DIR/dereference.rs:50:19
+   |
+LL |     let b: &str = a.deref().deref();
+   |                   ^^^^^^^^^^^^^^^^^ help: try this: `&*a.deref()`
+
+error: explicit deref method call
+  --> $DIR/dereference.rs:53:13
+   |
+LL |     let b = opt_a.unwrap().deref();
+   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*opt_a.unwrap()`
+
+error: aborting due to 11 previous errors