rust/tests/ui/useless_asref.stderr

74 lines
2.2 KiB
Text

error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:33:18
|
33 | foo_rstr(rstr.as_ref());
| ^^^^^^^^^^^^^ help: try this: `rstr`
|
note: lint level defined here
--> $DIR/useless_asref.rs:3:9
|
3 | #![deny(clippy::useless_asref)]
| ^^^^^^^^^^^^^^^^^^^^^
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:35:20
|
35 | foo_rslice(rslice.as_ref());
| ^^^^^^^^^^^^^^^ help: try this: `rslice`
error: this call to `as_mut` does nothing
--> $DIR/useless_asref.rs:39:21
|
39 | foo_mrslice(mrslice.as_mut());
| ^^^^^^^^^^^^^^^^ help: try this: `mrslice`
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:41:20
|
41 | foo_rslice(mrslice.as_ref());
| ^^^^^^^^^^^^^^^^ help: try this: `mrslice`
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:48:20
|
48 | foo_rslice(rrrrrslice.as_ref());
| ^^^^^^^^^^^^^^^^^^^ help: try this: `rrrrrslice`
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:50:18
|
50 | foo_rstr(rrrrrstr.as_ref());
| ^^^^^^^^^^^^^^^^^ help: try this: `rrrrrstr`
error: this call to `as_mut` does nothing
--> $DIR/useless_asref.rs:55:21
|
55 | foo_mrslice(mrrrrrslice.as_mut());
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:57:20
|
57 | foo_rslice(mrrrrrslice.as_ref());
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:60:16
|
60 | foo_rrrrmr((&&&&MoreRef).as_ref());
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(&&&&MoreRef)`
error: this call to `as_mut` does nothing
--> $DIR/useless_asref.rs:106:13
|
106 | foo_mrt(mrt.as_mut());
| ^^^^^^^^^^^^ help: try this: `mrt`
error: this call to `as_ref` does nothing
--> $DIR/useless_asref.rs:108:12
|
108 | foo_rt(mrt.as_ref());
| ^^^^^^^^^^^^ help: try this: `mrt`
error: aborting due to 11 previous errors