Stabilize char_max_len

This commit is contained in:
Pavel Grigorenko 2025-08-19 17:46:31 +03:00
parent c8551d3c63
commit f9dcc6b21c
13 changed files with 17 additions and 26 deletions

View file

@ -19,7 +19,6 @@
#![feature(array_into_iter_constructors)]
#![feature(assert_matches)]
#![feature(char_internals)]
#![feature(char_max_len)]
#![feature(copied_into_inner)]
#![feature(core_intrinsics)]
#![feature(exact_size_is_empty)]

View file

@ -3,7 +3,6 @@
#![feature(iter_array_chunks)]
#![feature(assert_matches)]
#![feature(wtf8_internals)]
#![feature(char_max_len)]
#![feature(cow_is_borrowed)]
#![feature(core_intrinsics)]
#![feature(deque_extend_front)]

View file

@ -2,7 +2,6 @@
use std::assert_matches::assert_matches;
use std::borrow::Cow;
use std::char::MAX_LEN_UTF8;
use std::cmp::Ordering::{Equal, Greater, Less};
use std::str::{from_utf8, from_utf8_unchecked};
@ -1232,7 +1231,7 @@ fn test_to_uppercase_rev_iterator() {
#[test]
#[cfg_attr(miri, ignore)] // Miri is too slow
fn test_chars_decoding() {
let mut bytes = [0; MAX_LEN_UTF8];
let mut bytes = [0; char::MAX_LEN_UTF8];
for c in (0..0x110000).filter_map(std::char::from_u32) {
let s = c.encode_utf8(&mut bytes);
if Some(c) != s.chars().next() {
@ -1244,7 +1243,7 @@ fn test_chars_decoding() {
#[test]
#[cfg_attr(miri, ignore)] // Miri is too slow
fn test_chars_rev_decoding() {
let mut bytes = [0; MAX_LEN_UTF8];
let mut bytes = [0; char::MAX_LEN_UTF8];
for c in (0..0x110000).filter_map(std::char::from_u32) {
let s = c.encode_utf8(&mut bytes);
if Some(c) != s.chars().rev().next() {