Remove the UnicodeVersion struct containing major, minor and update fields and replace it with a 3-tuple containing the version number. As the value of each field is limited to 255 use u8 to store them.
12 lines
252 B
Rust
12 lines
252 B
Rust
// run-pass
|
|
|
|
#![feature(unicode_version)]
|
|
|
|
/// Tests access to the internal Unicode Version type and value.
|
|
pub fn main() {
|
|
check(std::char::UNICODE_VERSION);
|
|
}
|
|
|
|
pub fn check(unicode_version: (u8, u8, u8)) {
|
|
assert!(unicode_version.0 >= 10);
|
|
}
|