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 18:21:55 +02:00
// Test that we do some basic error correction in the tokeniser (and don't spew
2017-06-23 17:43:35 -07:00
// too many bogus errors).
fn foo() -> usize {
3
}
fn bar() {
2017-11-20 13:13:27 +01:00
foo() //~ ERROR mismatched types
2017-06-23 17:43:35 -07:00
}
fn main() {
2017-06-23 17:43:35 -07:00
bar()
}