rust/library
Guillaume Gomez 7fc3183520
Rollup merge of #100291 - WaffleLapkin:cstr_const_methods, r=oli-obk
constify some `CStr` methods

This PR marks the following public APIs as `const`:
```rust
impl CStr {
    // feature(const_cstr_from_bytes)
    pub const fn from_bytes_until_nul(bytes: &[u8]) -> Result<&CStr, FromBytesUntilNulError>;
    pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, FromBytesWithNulError>;

    // feature(const_cstr_to_bytes)
    pub const fn to_bytes(&self) -> &[u8];
    pub const fn to_bytes_with_nul(&self) -> &[u8];
    pub const fn to_str(&self) -> Result<&str, str::Utf8Error>;
}
```

r? ```@oli-obk``` (use of `const_eval_select` :P )
cc ```@mina86``` (you've asked for this <3 )
2022-09-12 22:47:14 +02:00
..
alloc Alternate approach; just modify Drain 2022-09-10 17:52:34 -04:00
backtrace@07872f28cd
core Rollup merge of #100291 - WaffleLapkin:cstr_const_methods, r=oli-obk 2022-09-12 22:47:14 +02:00
panic_abort
panic_unwind
portable-simd
proc_macro Rollup merge of #100767 - kadiwa4:escape_ascii, r=jackh726 2022-09-12 15:21:30 +05:30
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #100767 - kadiwa4:escape_ascii, r=jackh726 2022-09-12 15:21:30 +05:30
stdarch@42df7394d3
test Fix naming format of IEEE 754 standard 2022-09-11 04:13:33 +02:00
unwind