rust/tests/ui/useless_asref.stderr

117 lines
3.7 KiB
Plaintext
Raw Normal View History

2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:50:18
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rstr(rstr.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^ help: try: `rstr`
2017-10-20 10:39:20 -05:00
|
2020-01-31 13:21:10 -06:00
note: the lint level is defined here
2024-02-17 06:16:29 -06:00
--> tests/ui/useless_asref.rs:1:9
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | #![deny(clippy::useless_asref)]
| ^^^^^^^^^^^^^^^^^^^^^
2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:52:20
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rslice(rslice.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^ help: try: `rslice`
2017-10-20 10:39:20 -05:00
error: this call to `as_mut` does nothing
--> tests/ui/useless_asref.rs:56:21
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_mrslice(mrslice.as_mut());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^ help: try: `mrslice`
2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:58:20
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rslice(mrslice.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^ help: try: `mrslice`
2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:65:20
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rslice(rrrrrslice.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^ help: try: `rrrrrslice`
2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:67:18
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rstr(rrrrrstr.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^ help: try: `rrrrrstr`
2017-10-20 10:39:20 -05:00
error: this call to `as_mut` does nothing
--> tests/ui/useless_asref.rs:72:21
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_mrslice(mrrrrrslice.as_mut());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^^ help: try: `mrrrrrslice`
2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:74:20
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rslice(mrrrrrslice.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^^ help: try: `mrrrrrslice`
2017-10-20 10:39:20 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:78:16
2017-10-20 10:39:20 -05:00
|
2018-12-27 09:57:55 -06:00
LL | foo_rrrrmr((&&&&MoreRef).as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&&&&MoreRef)`
2017-10-20 10:39:20 -05:00
2017-10-21 12:42:35 -05:00
error: this call to `as_mut` does nothing
--> tests/ui/useless_asref.rs:128:13
2018-12-27 09:57:55 -06:00
|
LL | foo_mrt(mrt.as_mut());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^ help: try: `mrt`
2017-10-21 12:42:35 -05:00
error: this call to `as_ref` does nothing
--> tests/ui/useless_asref.rs:130:12
2018-12-27 09:57:55 -06:00
|
LL | foo_rt(mrt.as_ref());
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^ help: try: `mrt`
2017-10-21 12:42:35 -05:00
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:141:13
2024-01-06 09:56:38 -06:00
|
LL | let z = x.as_ref().map(String::clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:143:13
2024-01-06 09:56:38 -06:00
|
LL | let z = x.as_ref().map(|z| z.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
2024-01-06 09:56:38 -06:00
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:145:13
2024-01-06 09:56:38 -06:00
|
LL | let z = x.as_ref().map(|z| String::clone(z));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
2024-01-06 09:56:38 -06:00
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:169:9
|
LL | x.field.as_ref().map(|v| v.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:171:9
|
LL | x.field.as_ref().map(Clone::clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:173:9
|
LL | x.field.as_ref().map(|v| Clone::clone(v));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
2024-01-13 10:46:46 -06:00
error: this call to `as_ref.map(...)` does nothing
--> tests/ui/useless_asref.rs:178:9
2024-01-13 10:46:46 -06:00
|
LL | Some(1).as_ref().map(|&x| x.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(1).clone()`
error: aborting due to 18 previous errors
2018-01-16 10:06:27 -06:00