1
1
error[E0308]: mismatched types
2
- --> $DIR/typeck_fail.rs:8:16
2
+ --> $DIR/typeck_fail.rs:8:9
3
3
|
4
4
LL | match "foo".to_string() {
5
5
| ----------------- this expression has type `String`
6
- LL | deref!("foo") => {}
7
- | ^^^^^ expected `str`, found `&str`
8
-
9
- error[E0308]: mismatched types
10
- --> $DIR/typeck_fail.rs:10:9
11
- |
12
- LL | match "foo".to_string() {
13
- | ----------------- this expression has type `String`
14
- ...
15
6
LL | "foo" => {}
16
7
| ^^^^^ expected `String`, found `&str`
17
8
18
9
error[E0308]: mismatched types
19
- --> $DIR/typeck_fail.rs:15:16
20
- |
21
- LL | match &"foo".to_string() {
22
- | ------------------ this expression has type `&String`
23
- LL | deref!("foo") => {}
24
- | ^^^^^ expected `str`, found `&str`
25
-
26
- error[E0308]: mismatched types
27
- --> $DIR/typeck_fail.rs:17:9
10
+ --> $DIR/typeck_fail.rs:13:9
28
11
|
29
12
LL | match &"foo".to_string() {
30
13
| ------------------ this expression has type `&String`
31
- ...
32
14
LL | "foo" => {}
33
15
| ^^^^^ expected `&String`, found `&str`
34
16
|
35
17
= note: expected reference `&String`
36
18
found reference `&'static str`
37
19
38
20
error[E0308]: mismatched types
39
- --> $DIR/typeck_fail.rs:24 :9
21
+ --> $DIR/typeck_fail.rs:20 :9
40
22
|
41
23
LL | match Some(0) {
42
24
| ------- this expression has type `Option<{integer}>`
@@ -46,6 +28,6 @@ LL | Ok(0) => {}
46
28
= note: expected enum `Option<{integer}>`
47
29
found enum `Result<_, _>`
48
30
49
- error: aborting due to 5 previous errors
31
+ error: aborting due to 3 previous errors
50
32
51
33
For more information about this error, try `rustc --explain E0308`.
0 commit comments