summaryrefslogtreecommitdiffstats
path: root/src/test/ui/block-result/unexpected-return-on-unit.rs
blob: 2fcbfe8c068395110334e76ba74e95c23b5857c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Test that we do some basic error correction in the tokeniser (and don't spew
// too many bogus errors).

fn foo() -> usize {
    3
}

fn bar() {
    foo() //~ ERROR mismatched types
}

fn main() {
    bar()
}