Skip to content

Commit

Permalink
Add a regression test for rust-lang#113238
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Aug 14, 2023
1 parent 180dffb commit 677afb4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ui/std/slice-from-array-issue-113238.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// 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(&[]);
}

0 comments on commit 677afb4

Please sign in to comment.