break_array 9001.0.1

For breaking array indexing.
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented1 out of 1 items with examples
  • Size
  • Source code size: 3.79 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 449.97 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • rodrimati1992/break_array
    6 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rodrimati1992

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.