summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numeric/const-scope.rs
blob: 053599a9bb9f1415a06a82893507e3570d199645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
const C: i32 = 1i8; //~ ERROR mismatched types
const D: i8 = C; //~ ERROR mismatched types

const fn foo() {
    let c: i32 = 1i8; //~ ERROR mismatched types
    let d: i8 = c; //~ ERROR mismatched types
}

fn main() {
    let c: i32 = 1i8; //~ ERROR mismatched types
    let d: i8 = c; //~ ERROR mismatched types
}