diff options
| author | bors <bors@rust-lang.org> | 2024-11-06 04:07:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-06 04:07:32 +0000 |
| commit | cf2b370ad02de2d5953a3142f4685c472b0f5991 (patch) | |
| tree | 97d53f2a280ed73e5995843dd57eeb99ec2d3a90 /src/tools | |
| parent | a69df72bdc58742281d17cc3bed2947de70c1482 (diff) | |
| parent | 0804815e69cd5e0428c087b5191f7f3f34d9122b (diff) | |
| download | rust-cf2b370ad02de2d5953a3142f4685c472b0f5991.tar.gz rust-cf2b370ad02de2d5953a3142f4685c472b0f5991.zip | |
Auto merge of #132500 - RalfJung:char-is-whitespace-const, r=jhpratt
make char::is_whitespace unstably const I am adding this to the existing https://github.com/rust-lang/rust/issues/132241 feature gate, since `is_digit` and `is_whitespace` seem similar enough that one can group them together.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/unicode-table-generator/src/cascading_map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/unicode-table-generator/src/cascading_map.rs b/src/tools/unicode-table-generator/src/cascading_map.rs index 036f0bd7eac..1eb35e819c0 100644 --- a/src/tools/unicode-table-generator/src/cascading_map.rs +++ b/src/tools/unicode-table-generator/src/cascading_map.rs @@ -65,7 +65,7 @@ impl RawEmitter { self.bytes_used += 256; writeln!(&mut self.file, "#[inline]").unwrap(); - writeln!(&mut self.file, "pub fn lookup(c: char) -> bool {{").unwrap(); + writeln!(&mut self.file, "pub const fn lookup(c: char) -> bool {{").unwrap(); writeln!(&mut self.file, " match c as u32 >> 8 {{").unwrap(); for arm in arms { writeln!(&mut self.file, " {},", arm).unwrap(); |
