about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/spans.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-19 05:51:42 +0000
committerbors <bors@rust-lang.org>2022-06-19 05:51:42 +0000
commit5fb8a3926619a18a2e31627e4cdf05f16530b0eb (patch)
treebf422d1f8697954e89cc67e89b7bcff1b69b2d31 /compiler/rustc_mir_transform/src/coverage/spans.rs
parent6c9be6e4e9074ca58cef8b1ded299eff72e3ac52 (diff)
parent89295352ee00a5555141db5fb7bcc41c822d4aec (diff)
downloadrust-5fb8a3926619a18a2e31627e4cdf05f16530b0eb.tar.gz
rust-5fb8a3926619a18a2e31627e4cdf05f16530b0eb.zip
Auto merge of #97367 - WaffleLapkin:stabilize_checked_slice_to_str_conv, r=dtolnay
Stabilize checked slice->str conversion functions

This PR stabilizes the following APIs as `const` functions in Rust 1.63:
```rust
// core::str

pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error>;

impl Utf8Error {
    pub const fn valid_up_to(&self) -> usize;
    pub const fn error_len(&self) -> Option<usize>;
}
```

Note that the `from_utf8_mut` function is not stabilized as unique references (`&mut _`) are [unstable in const context].

FCP: https://github.com/rust-lang/rust/issues/91006#issuecomment-1134593095

[unstable in const context]: https://github.com/rust-lang/rust/issues/57349
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/spans.rs')
0 files changed, 0 insertions, 0 deletions