11error[E0308]: mismatched types
2- --> $DIR/typeck_fail.rs:8:16
2+ --> $DIR/typeck_fail.rs:8:9
33 |
44LL | match "foo".to_string() {
55 | ----------------- 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- ...
156LL | "foo" => {}
167 | ^^^^^ expected `String`, found `&str`
178
189error[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
2811 |
2912LL | match &"foo".to_string() {
3013 | ------------------ this expression has type `&String`
31- ...
3214LL | "foo" => {}
3315 | ^^^^^ expected `&String`, found `&str`
3416 |
3517 = note: expected reference `&String`
3618 found reference `&'static str`
3719
3820error[E0308]: mismatched types
39- --> $DIR/typeck_fail.rs:24 :9
21+ --> $DIR/typeck_fail.rs:20 :9
4022 |
4123LL | match Some(0) {
4224 | ------- this expression has type `Option<{integer}>`
@@ -46,6 +28,6 @@ LL | Ok(0) => {}
4628 = note: expected enum `Option<{integer}>`
4729 found enum `Result<_, _>`
4830
49- error: aborting due to 5 previous errors
31+ error: aborting due to 3 previous errors
5032
5133For more information about this error, try `rustc --explain E0308`.
0 commit comments