2021-06-03 01:41:37 -05:00
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:31:14
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | Some(ref x) => x,
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::ref-binding-to-reference` implied by `-D warnings`
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL | Some(x) => &x,
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~ ~~
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:37:14
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | Some(ref x) => {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ Some(x) => {
|
2021-06-03 01:41:37 -05:00
|
|
|
LL | f1(x);
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ f1(x);
|
|
|
|
LL ~ &x
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:47:14
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | Some(ref x) => m2!(x),
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL | Some(x) => m2!(&x),
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~ ~~
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:52:15
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | let _ = |&ref x: &&String| {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ let _ = |&x: &&String| {
|
|
|
|
LL ~ let _: &&String = &x;
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:58:12
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ fn f2<'a>(&x: &&'a String) -> &'a String {
|
|
|
|
LL ~ let _: &&String = &x;
|
|
|
|
LL ~ x
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:65:11
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | fn f(&ref x: &&String) {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ fn f(&x: &&String) {
|
|
|
|
LL ~ let _: &&String = &x;
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
error: this pattern creates a reference to a reference
|
2022-06-16 10:39:06 -05:00
|
|
|
--> $DIR/ref_binding_to_reference.rs:73:11
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
LL | fn f(&ref x: &&String) {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ fn f(&x: &&String) {
|
|
|
|
LL ~ let _: &&String = &x;
|
2021-06-03 01:41:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|