2018-11-17 01:37:23 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
|
|
|
|
= note: expected type `()`
|
|
|
|
found type `{integer}`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-11-30 02:41:26 -06:00
|
|
|
--> $DIR/span-preservation.rs:13:20
|
2018-11-17 01:37:23 -06:00
|
|
|
|
|
2018-11-30 02:41:26 -06:00
|
|
|
LL | let x: usize = "hello";;;;; //~ ERROR mismatched types
|
2018-11-17 01:37:23 -06:00
|
|
|
| ^^^^^^^ expected usize, found reference
|
|
|
|
|
|
|
|
|
= note: expected type `usize`
|
|
|
|
found type `&'static str`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-11-30 02:41:26 -06:00
|
|
|
--> $DIR/span-preservation.rs:19:29
|
2018-11-17 01:37:23 -06:00
|
|
|
|
|
2019-01-18 02:12:09 -06:00
|
|
|
LL | fn b(x: Option<isize>) -> usize {
|
|
|
|
| ----- expected `usize` because of return type
|
|
|
|
LL | match x {
|
2018-11-30 02:41:26 -06:00
|
|
|
LL | Some(x) => { return x }, //~ ERROR mismatched types
|
2018-11-17 01:37:23 -06:00
|
|
|
| ^ expected usize, found isize
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-11-30 02:41:26 -06:00
|
|
|
--> $DIR/span-preservation.rs:35:22
|
2018-11-17 01:37:23 -06:00
|
|
|
|
|
2018-11-30 02:41:26 -06:00
|
|
|
LL | let x = Foo { a: 10isize }; //~ ERROR mismatched types
|
2018-11-17 01:37:23 -06:00
|
|
|
| ^^^^^^^ expected usize, found isize
|
|
|
|
|
|
|
|
error[E0560]: struct `c::Foo` has no field named `b`
|
2018-11-30 02:41:26 -06:00
|
|
|
--> $DIR/span-preservation.rs:36:26
|
2018-11-17 01:37:23 -06:00
|
|
|
|
|
2018-11-30 02:41:26 -06:00
|
|
|
LL | let y = Foo { a: 10, b: 10isize }; //~ ERROR has no field named `b`
|
2018-11-17 01:37:23 -06:00
|
|
|
| ^ `c::Foo` does not have this field
|
|
|
|
|
|
|
|
|
= note: available fields are: `a`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-11-30 02:41:26 -06:00
|
|
|
--> $DIR/span-preservation.rs:49:5
|
2018-11-17 01:37:23 -06:00
|
|
|
|
|
|
|
|
LL | extern "C" fn baz() {
|
|
|
|
| - possibly return type missing here?
|
2018-11-30 02:41:26 -06:00
|
|
|
LL | 0 //~ ERROR mismatched types
|
2018-12-31 19:43:08 -06:00
|
|
|
| ^ expected (), found integer
|
2018-11-17 01:37:23 -06:00
|
|
|
|
|
|
|
|
= note: expected type `()`
|
|
|
|
found type `{integer}`
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0308, E0560.
|
|
|
|
For more information about an error, try `rustc --explain E0308`.
|