help: try this
|
LL | Some(x) => &x,
- | ^ ^^
+ | ~ ~~
error: this pattern creates a reference to a reference
--> $DIR/ref_binding_to_reference.rs:37:14
|
help: try this
|
-LL | Some(x) => {
+LL ~ Some(x) => {
LL | f1(x);
-LL | f1(x);
-LL | &x
+LL ~ f1(x);
+LL ~ &x
|
error: this pattern creates a reference to a reference
help: try this
|
LL | Some(x) => m2!(&x),
- | ^ ^^
+ | ~ ~~
error: this pattern creates a reference to a reference
--> $DIR/ref_binding_to_reference.rs:52:15
|
help: try this
|
-LL | let _ = |&x: &&String| {
-LL | let _: &&String = &x;
+LL ~ let _ = |&x: &&String| {
+LL ~ let _: &&String = &x;
|
error: this pattern creates a reference to a reference
|
help: try this
|
-LL | fn f2<'a>(&x: &&'a String) -> &'a String {
-LL | let _: &&String = &x;
-LL | x
+LL ~ fn f2<'a>(&x: &&'a String) -> &'a String {
+LL ~ let _: &&String = &x;
+LL ~ x
|
error: this pattern creates a reference to a reference
|
help: try this
|
-LL | fn f(&x: &&String) {
-LL | let _: &&String = &x;
+LL ~ fn f(&x: &&String) {
+LL ~ let _: &&String = &x;
|
error: this pattern creates a reference to a reference
|
help: try this
|
-LL | fn f(&x: &&String) {
-LL | let _: &&String = &x;
+LL ~ fn f(&x: &&String) {
+LL ~ let _: &&String = &x;
|
error: aborting due to 7 previous errors