summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-type-mismatch.rs
blob: 6e56c046f7ae27601488c8bd0a1bb4c0be9f8f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
// `const`s shouldn't suggest `.into()`

const TEN: u8 = 10;
const TWELVE: u16 = TEN + 2;
//~^ ERROR mismatched types [E0308]

fn main() {
    const TEN: u8 = 10;
    const ALSO_TEN: u16 = TEN;
    //~^ ERROR mismatched types [E0308]
}