rust/tests/ui/block-result/unexpected-return-on-unit.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
212 B
Rust
Raw Normal View History

2018-10-22 11:21:55 -05:00
// Test that we do some basic error correction in the tokeniser (and don't spew
2017-06-23 19:43:35 -05:00
// too many bogus errors).
fn foo() -> usize {
3
}
fn bar() {
2017-11-20 06:13:27 -06:00
foo() //~ ERROR mismatched types
2017-06-23 19:43:35 -05:00
}
fn main() {
2017-06-23 19:43:35 -05:00
bar()
}