Created
October 7, 2014 22:27
-
-
Save erszcz/da0cdc6cd2964e5d03a3 to your computer and use it in GitHub Desktop.
Rust bug in Unicode handling?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00:25:30 erszcz @ x2 : /tmp | |
$ cat zoladz.rs | |
fn main() { | |
let z = "żołądź"; | |
println!("{:c}", z.char_at(1)); | |
} | |
00:25:33 erszcz @ x2 : /tmp | |
$ rustc zoladz.rs | |
00:25:37 erszcz @ x2 : /tmp | |
$ ./zoladz | |
task '<main>' failed at 'assertion failed: (w != 0)', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/str.rs:2059 | |
00:25:38 erszcz @ x2 : /tmp | |
$ rustc --version | |
rustc 0.12.0-nightly (b5ba2f551 2014-10-06 20:27:14 +0000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let z = "żołądź"; | |
println!("{:c}", z.char_at(1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment