[−][src]Crate break_array
Want indexing arrays to not work anymore?
Simply do this:
ⓘThis example deliberately fails to compile
use break_array; let array=[0,1,2,3]; assert_eq!( array[0], 0 );
and marvel at the compiler error:
|
6 | assert_eq!( array[0], 0 );
| ^ expected struct `break_array::MyType`, found integer
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.