1 error[E0308]: mismatched types
3 = note: expected type `()`
6 error[E0308]: mismatched types
7 --> $DIR/span-preservation.rs:12:20
9 LL | let x: usize = "hello";;;;;
10 | ^^^^^^^ expected usize, found reference
12 = note: expected type `usize`
13 found type `&'static str`
15 error[E0308]: mismatched types
16 --> $DIR/span-preservation.rs:18:29
18 LL | Some(x) => { return x },
19 | ^ expected usize, found isize
21 error[E0308]: mismatched types
22 --> $DIR/span-preservation.rs:34:22
24 LL | let x = Foo { a: 10isize };
25 | ^^^^^^^ expected usize, found isize
27 error[E0560]: struct `c::Foo` has no field named `b`
28 --> $DIR/span-preservation.rs:35:26
30 LL | let y = Foo { a: 10, b: 10isize };
31 | ^ `c::Foo` does not have this field
33 = note: available fields are: `a`
35 error[E0308]: mismatched types
36 --> $DIR/span-preservation.rs:48:5
38 LL | extern "C" fn baz() {
39 | - possibly return type missing here?
41 | ^ expected (), found integral variable
43 = note: expected type `()`
44 found type `{integer}`
46 error: aborting due to 6 previous errors
48 Some errors occurred: E0308, E0560.
49 For more information about an error, try `rustc --explain E0308`.