rust/library
Matthias Krüger f337e28bd9
Rollup merge of #147773 - timvisee:docs-empty-is-ascii, r=Noratrieb
`is_ascii` on an empty string or slice returns true

Update the description of the [`is_ascii`](https://doc.rust-lang.org/std/primitive.str.html#method.is_ascii) functions - an empty string or slice also returns `true`.

This follows the pattern of [`all()`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.all). Clippy currently suggests to change `string.chars().all(|c| c.is_ascii())` into `string.is_ascii()`. This suggestion therefore seems fitting.

I've already questioned the behavior for this multiple times. I've always had to check the internals to conclude how it works. That's why I'm opening this PR to add it directly in the documentation.
2025-10-16 19:35:28 +02:00
..
alloc remove duplicate inline macro 2025-10-15 18:48:25 +02:00
alloctests Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnr 2025-09-26 18:11:08 +02:00
backtrace@b65ab935fb Update the backtrace submodule 2025-06-16 07:00:13 +00:00
compiler-builtins Mark float intrinsics with no preconditions as safe 2025-09-21 20:37:51 -04:00
core Rollup merge of #147773 - timvisee:docs-empty-is-ascii, r=Noratrieb 2025-10-16 19:35:28 +02:00
coretests Rollup merge of #146187 - clarfonthey:const-drop-in-place, r=oli-obk 2025-10-14 19:47:28 +02:00
panic_abort Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
panic_unwind Migrate panic_unwind to use cfg_select! 2025-08-20 16:45:24 -07:00
portable-simd docs(std): add missing closing code block fences in doc comments 2025-09-02 22:11:29 +02:00
proc_macro Rollup merge of #147497 - cyrgani:proc-macro-cleanups-3, r=petrochenkov 2025-10-14 16:30:58 +11:00
profiler_builtins Fix profiler_builtins build script to handle full path to profiler lib 2025-04-11 16:57:38 +02:00
rtstartup Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc-std-workspace-alloc Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
rustc-std-workspace-core Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
rustc-std-workspace-std Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
std Rollup merge of #147773 - timvisee:docs-empty-is-ascii, r=Noratrieb 2025-10-16 19:35:28 +02:00
std_detect std_detect Darwin AArch64: synchronize features 2025-09-13 23:29:55 -07:00
stdarch Auto merge of #146683 - clarfonthey:safe-intrinsics, r=RalfJung,Amanieu 2025-09-22 14:35:46 +00:00
sysroot Add panic=immediate-abort 2025-09-21 13:12:18 -04:00
test Rollup merge of #142807 - sourcefrog:failfast, r=dtolnay 2025-09-17 14:56:41 +10:00
unwind Indent some code inside cfg_select! 2025-08-16 16:01:08 -07:00
windows_targets Rollup merge of #144399 - bjorn3:stdlib_tests_separate_packages, r=Mark-Simulacrum 2025-07-28 08:36:53 +02:00
Cargo.lock Rollup merge of #147000 - moturus:motor-os_stdlib_pr, r=tgross35 2025-10-16 19:35:23 +02:00
Cargo.toml Remove the std workspace patch for compiler-builtins 2025-08-19 18:56:35 +00:00