]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeof/type_mismatch.rs
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / typeof / type_mismatch.rs
1 // Test that using typeof results in the correct type mismatch errors instead of always assuming
2 // `usize`, in addition to the pre-existing "typeof is reserved and unimplemented" error
3 fn main() {
4     const a: u8 = 1;
5     let b: typeof(a) = 1i8;
6     //~^ ERROR `typeof` is a reserved keyword but unimplemented
7     //~| ERROR mismatched types
8     //~| expected `u8`, found `i8`
9 }