message: generic integer: ensure overflowing from usize panics in debug builds
diff: @@ -104,4 +104,12 @@ mod test {
  let b: u16 = u16::from_usize(131072); // 2^17
  println!("{}", b);
  }
  +
  + #[test]
  + #[cfg_attr(debug_assertions, should_panic)]
  + fn negative_i16() {
  + let b: i16 = -1;
  + let a = b.index();
  + println!("{}", a);
  + }
  }
  