diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-10-14 22:43:03 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-10-15 16:23:26 -0400 |
| commit | 420b4260b4000af2b1ffb579fb7df5e437e0faa2 (patch) | |
| tree | 355dac7d69d6abe938a7d3d095a2b527a7a2af03 /src/libstd | |
| parent | a7e8957c591651b6568d1b495d29ee85d11c0975 (diff) | |
| download | rust-420b4260b4000af2b1ffb579fb7df5e437e0faa2.tar.gz rust-420b4260b4000af2b1ffb579fb7df5e437e0faa2.zip | |
fix bounds checking failure message
casting the `uint` to an `int` can result in printing high values as negative intege
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/unstable/lang.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/unstable/lang.rs b/src/libstd/unstable/lang.rs index 6f2928e99fe..e30d0e77367 100644 --- a/src/libstd/unstable/lang.rs +++ b/src/libstd/unstable/lang.rs @@ -25,7 +25,7 @@ pub fn fail_(expr: *c_char, file: *c_char, line: size_t) -> ! { pub fn fail_bounds_check(file: *c_char, line: size_t, index: size_t, len: size_t) { let msg = format!("index out of bounds: the len is {} but the index is {}", - len as int, index as int); + len as uint, index as uint); do msg.with_c_str |buf| { fail_(buf, file, line); } |
