]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-type-mismatch.rs
Rollup merge of #106963 - compiler-errors:scope-expr-dupe, r=michaelwoerister
[rust.git] / tests / ui / consts / const-type-mismatch.rs
1 // `const`s shouldn't suggest `.into()`
2
3 const TEN: u8 = 10;
4 const TWELVE: u16 = TEN + 2;
5 //~^ ERROR mismatched types [E0308]
6
7 fn main() {
8     const TEN: u8 = 10;
9     const ALSO_TEN: u16 = TEN;
10     //~^ ERROR mismatched types [E0308]
11 }