1 //~ ERROR mismatched types
2 // aux-build:test-macros.rs
4 // For each of these, we should get the appropriate type mismatch error message,
5 // and the function should be echoed.
8 extern crate test_macros;
12 let x: usize = "hello"; //~ ERROR mismatched types
16 fn b(x: Option<isize>) -> usize {
18 Some(x) => { return x }, //~ ERROR mismatched types
34 let x = Foo { a: 10isize }; //~ ERROR mismatched types
35 let y = Foo { a: 10, b: 10isize }; //~ ERROR has no field named `b`
38 // FIXME: This doesn't work at the moment. See the one below. The pretty-printer
39 // injects a "C" between `extern` and `fn` which causes a "probably_eq"
40 // `TokenStream` mismatch. The lack of `"C"` should be preserved in the AST.
48 0 //~ ERROR mismatched types