You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I accidentally used let statements when I was trying to assign to elements of a bytearray instead of just the equals sign. An ICE resulted.
I tried this code:
fnto_size(tag_size:u32) -> [u8;4]{letmut bytes:[u8;4] = [0;4];assert!(tag_size < 2.pow(28),"to_size: Number too big to convert!");let bytes[0] = (tag_size &0x0FE00000 >> 21)asu8;let bytes[1] = (tag_size &0x001FC000 >> 14)asu8;let bytes[2] = (tag_size &0x00003F80 >> 7)asu8;let bytes[3] = (tag_size &0x0000007F >> 0)asu8;
bytes
}fnmain(){println!("{:?}", to_size(257));}
I expected the compiler to recognize those lets as errors, but instead it panicked with:
src/main.rs:12:9: 12:14 error: internal compiler error: ident only path should have been covered already
src/main.rs:12 let bytes[0] = (tag_size & 0x0FE00000 >> 21) as u8;
^~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:130
I accidentally used let statements when I was trying to assign to elements of a bytearray instead of just the equals sign. An ICE resulted.
I tried this code:
I expected the compiler to recognize those lets as errors, but instead it panicked with:
Meta
rustc --version --verbose
:rustc 1.0.0-beta (9854143 2015-04-02) (built 2015-04-02)
binary: rustc
commit-hash: 9854143
commit-date: 2015-04-02
build-date: 2015-04-02
host: x86_64-unknown-linux-gnu
release: 1.0.0-beta
Backtrace:
The text was updated successfully, but these errors were encountered: