]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/ref_binding_to_reference.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / ref_binding_to_reference.stderr
index 00aeff4fefa32536d43acb6bc3ae9261c0e603fb..eb36cd516a246a9e4f581b7079efb0bacc8cc09d 100644 (file)
@@ -8,7 +8,7 @@ LL |         Some(ref x) => x,
 help: try this
    |
 LL |         Some(x) => &x,
-   |              ^     ^^
+   |              ~     ~~
 
 error: this pattern creates a reference to a reference
   --> $DIR/ref_binding_to_reference.rs:37:14
@@ -18,10 +18,10 @@ LL |         Some(ref x) => {
    |
 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
@@ -33,7 +33,7 @@ LL |         Some(ref x) => m2!(x),
 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
@@ -43,8 +43,8 @@ LL |     let _ = |&ref x: &&String| {
    |
 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
@@ -55,9 +55,9 @@ LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
    |
 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
@@ -68,8 +68,8 @@ LL |     fn f(&ref x: &&String) {
    |
 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
@@ -80,8 +80,8 @@ LL |     fn f(&ref x: &&String) {
    |
 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