From d9c42d5c84bf32183b9be3e6b1860d507279b0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Tue, 16 Apr 2019 18:55:58 +0200 Subject: [PATCH] Fix the max value of usize on 16-bit platforms --- src/libcore/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 01da5518868a1..b372bd3cb07bd 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -4323,7 +4323,7 @@ impl u128 { #[cfg(target_pointer_width = "16")] #[lang = "usize"] impl usize { - uint_impl! { usize, u16, 16, 65536, "", "", 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48", + uint_impl! { usize, u16, 16, 65535, "", "", 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]" } } #[cfg(target_pointer_width = "32")]