typestrong constant integers
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user