@@ -2,9 +2,9 @@ error[E0308]: mismatched types
22 --> $DIR/as-ref.rs:6:27
33 |
44LL | opt.map(|arg| takes_ref(arg));
5- | - ^^^ expected &Foo, found struct `Foo`
5+ | --- ^^^ expected &Foo, found struct `Foo`
66 | |
7- | help: consider using `as_ref` instead: `as_ref().`
7+ | help: consider using `as_ref` instead: `as_ref().map `
88 |
99 = note: expected type `&Foo`
1010 found type `Foo`
@@ -13,9 +13,9 @@ error[E0308]: mismatched types
1313 --> $DIR/as-ref.rs:8:37
1414 |
1515LL | opt.and_then(|arg| Some(takes_ref(arg)));
16- | - ^^^ expected &Foo, found struct `Foo`
16+ | -------- ^^^ expected &Foo, found struct `Foo`
1717 | |
18- | help: consider using `as_ref` instead: `as_ref().`
18+ | help: consider using `as_ref` instead: `as_ref().and_then `
1919 |
2020 = note: expected type `&Foo`
2121 found type `Foo`
@@ -24,9 +24,9 @@ error[E0308]: mismatched types
2424 --> $DIR/as-ref.rs:11:27
2525 |
2626LL | opt.map(|arg| takes_ref(arg));
27- | - ^^^ expected &Foo, found struct `Foo`
27+ | --- ^^^ expected &Foo, found struct `Foo`
2828 | |
29- | help: consider using `as_ref` instead: `as_ref().`
29+ | help: consider using `as_ref` instead: `as_ref().map `
3030 |
3131 = note: expected type `&Foo`
3232 found type `Foo`
@@ -35,9 +35,9 @@ error[E0308]: mismatched types
3535 --> $DIR/as-ref.rs:13:35
3636 |
3737LL | opt.and_then(|arg| Ok(takes_ref(arg)));
38- | - ^^^ expected &Foo, found struct `Foo`
38+ | -------- ^^^ expected &Foo, found struct `Foo`
3939 | |
40- | help: consider using `as_ref` instead: `as_ref().`
40+ | help: consider using `as_ref` instead: `as_ref().and_then `
4141 |
4242 = note: expected type `&Foo`
4343 found type `Foo`
0 commit comments