From ea96c6c1e9f861f84aeceb776b50106887d7bd68 Mon Sep 17 00:00:00 2001 From: Brace1000 Date: Wed, 8 Apr 2026 16:49:59 -0400 Subject: [PATCH] docs: clarify u8::is_ascii_whitespace excludes vertical tab The standard library uses the WhatWG Infra Standard definition of ASCII whitespace, which does not include vertical tab (U+000B). The Rust language parser uses Unicode Pattern_White_Space, which does include it. --- library/core/src/num/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 5ba3695bc45c9..3c77c327cce65 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -1073,6 +1073,11 @@ impl u8 { /// "field splitting" in the Bourne shell][bfs] considers *only* /// SPACE, HORIZONTAL TAB, and LINE FEED as whitespace. /// + /// Note: The Rust language parser uses a different definition of + /// whitespace, which includes U+000B VERTICAL TAB. The Rust standard + /// library (this function) does **not** include vertical tab, following + /// the WhatWG Infra Standard instead. + /// /// If you are writing a program that will process an existing /// file format, check what that format's definition of whitespace is /// before using this function.