rust/tests/ui/std/slice-from-array-issue-113238.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
339 B
Rust
Raw Normal View History

2023-08-14 23:48:39 +00:00
// check-pass
// This intends to use the unsizing coercion from array to slice, but it only
// works if we resolve `<&[u8]>::from` as the reflexive `From<T> for T`. In
// #113238, we found that gimli had added its own `From<EndianSlice> for &[u8]`
// that affected all `std/backtrace` users.
fn main() {
let _ = <&[u8]>::from(&[]);
}