@@ -2,9 +2,9 @@ error[E0308]: mismatched types
2
2
--> $DIR/as-ref.rs:6:27
3
3
|
4
4
LL | opt.map(|arg| takes_ref(arg));
5
- | - ^^^ expected &Foo, found struct `Foo`
5
+ | --- ^^^ expected &Foo, found struct `Foo`
6
6
| |
7
- | help: consider using `as_ref` instead: `as_ref().`
7
+ | help: consider using `as_ref` instead: `as_ref().map `
8
8
|
9
9
= note: expected type `&Foo`
10
10
found type `Foo`
@@ -13,9 +13,9 @@ error[E0308]: mismatched types
13
13
--> $DIR/as-ref.rs:8:37
14
14
|
15
15
LL | opt.and_then(|arg| Some(takes_ref(arg)));
16
- | - ^^^ expected &Foo, found struct `Foo`
16
+ | -------- ^^^ expected &Foo, found struct `Foo`
17
17
| |
18
- | help: consider using `as_ref` instead: `as_ref().`
18
+ | help: consider using `as_ref` instead: `as_ref().and_then `
19
19
|
20
20
= note: expected type `&Foo`
21
21
found type `Foo`
@@ -24,9 +24,9 @@ error[E0308]: mismatched types
24
24
--> $DIR/as-ref.rs:11:27
25
25
|
26
26
LL | opt.map(|arg| takes_ref(arg));
27
- | - ^^^ expected &Foo, found struct `Foo`
27
+ | --- ^^^ expected &Foo, found struct `Foo`
28
28
| |
29
- | help: consider using `as_ref` instead: `as_ref().`
29
+ | help: consider using `as_ref` instead: `as_ref().map `
30
30
|
31
31
= note: expected type `&Foo`
32
32
found type `Foo`
@@ -35,9 +35,9 @@ error[E0308]: mismatched types
35
35
--> $DIR/as-ref.rs:13:35
36
36
|
37
37
LL | opt.and_then(|arg| Ok(takes_ref(arg)));
38
- | - ^^^ expected &Foo, found struct `Foo`
38
+ | -------- ^^^ expected &Foo, found struct `Foo`
39
39
| |
40
- | help: consider using `as_ref` instead: `as_ref().`
40
+ | help: consider using `as_ref` instead: `as_ref().and_then `
41
41
|
42
42
= note: expected type `&Foo`
43
43
found type `Foo`
0 commit comments