break_array

Crates.iobreak_array
lib.rsbreak_array
version9001.0.1
sourcesrc
created_at2020-02-13 09:47:23.490272
updated_at2020-02-13 10:10:38.357395
descriptionFor breaking array indexing.
homepage
repositoryhttps://github.com/rodrimati1992/break_array/
max_upload_size
id207947
size3,795
(rodrimati1992)

documentation

https://docs.rs/break_array/

README

Want indexing arrays to not work anymore?

Simply create a crate that depends on break_array:

use break_array as _;
fn main(){
    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`.

Note: You might not be able to get this compiler error if you're from the far future.

Commit count: 5

cargo fmt