mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
75 lines
2.2 KiB
Plaintext
75 lines
2.2 KiB
Plaintext
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:43:18
|
|
|
|
|
43 | foo_rstr(rstr.as_ref());
|
|
| ^^^^^^^^^^^^^ help: try this: `rstr`
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/useless_asref.rs:13:9
|
|
|
|
|
13 | #![deny(clippy::useless_asref)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:45:20
|
|
|
|
|
45 | foo_rslice(rslice.as_ref());
|
|
| ^^^^^^^^^^^^^^^ help: try this: `rslice`
|
|
|
|
error: this call to `as_mut` does nothing
|
|
--> $DIR/useless_asref.rs:49:21
|
|
|
|
|
49 | foo_mrslice(mrslice.as_mut());
|
|
| ^^^^^^^^^^^^^^^^ help: try this: `mrslice`
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:51:20
|
|
|
|
|
51 | foo_rslice(mrslice.as_ref());
|
|
| ^^^^^^^^^^^^^^^^ help: try this: `mrslice`
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:58:20
|
|
|
|
|
58 | foo_rslice(rrrrrslice.as_ref());
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try this: `rrrrrslice`
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:60:18
|
|
|
|
|
60 | foo_rstr(rrrrrstr.as_ref());
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `rrrrrstr`
|
|
|
|
error: this call to `as_mut` does nothing
|
|
--> $DIR/useless_asref.rs:65:21
|
|
|
|
|
65 | foo_mrslice(mrrrrrslice.as_mut());
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:67:20
|
|
|
|
|
67 | foo_rslice(mrrrrrslice.as_ref());
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:70:16
|
|
|
|
|
70 | foo_rrrrmr((&&&&MoreRef).as_ref());
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(&&&&MoreRef)`
|
|
|
|
error: this call to `as_mut` does nothing
|
|
--> $DIR/useless_asref.rs:116:13
|
|
|
|
|
116 | foo_mrt(mrt.as_mut());
|
|
| ^^^^^^^^^^^^ help: try this: `mrt`
|
|
|
|
error: this call to `as_ref` does nothing
|
|
--> $DIR/useless_asref.rs:118:12
|
|
|
|
|
118 | foo_rt(mrt.as_ref());
|
|
| ^^^^^^^^^^^^ help: try this: `mrt`
|
|
|
|
error: aborting due to 11 previous errors
|
|
|