diff --git a/src/libcore/benches/ascii.rs b/src/libcore/benches/ascii.rs index 968d28a9958..635537e3121 100644 --- a/src/libcore/benches/ascii.rs +++ b/src/libcore/benches/ascii.rs @@ -224,6 +224,18 @@ fn is_ascii_lowercase(b: u8) -> bool { } } + fn case14_subtract_multiplied_bool_match_range(bytes: &mut [u8]) { + fn is_ascii_lowercase(b: u8) -> bool { + match b { + b'a'...b'z' => true, + _ => false + } + } + for byte in bytes { + *byte -= (b'a' - b'A') * is_ascii_lowercase(*byte) as u8 + } + } + @iter is_ascii,