typestrong constant integers

This commit is contained in:
Oliver Schneider
2015-12-16 18:44:15 +01:00
parent 3ac4076ac0
commit 7bde56e149
65 changed files with 1617 additions and 920 deletions

View File

@@ -21,8 +21,7 @@ use std::{u8, u16, u32, u64, usize};
const A_I8_T
: [u32; (i8::MAX as i8 + 1u8) as usize]
//~^ ERROR mismatched types
//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8`
//~^ ERROR tried to add two integrals of different types [E0250]
= [0; (i8::MAX as usize) + 1];
fn main() {