Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8ea828b

Browse files
Add regression test for rust-lang#71394
1 parent 730c6f3 commit 8ea828b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
let data: &[u8] = &[0; 10];
3+
let _: &[i8] = data.into();
4+
//~^ ERROR the trait bound `&[i8]: std::convert::From<&[u8]>` is not satisfied
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0277]: the trait bound `&[i8]: std::convert::From<&[u8]>` is not satisfied
2+
--> $DIR/issue-71394-no-from-impl.rs:3:25
3+
|
4+
LL | let _: &[i8] = data.into();
5+
| ^^^^ the trait `std::convert::From<&[u8]>` is not implemented for `&[i8]`
6+
|
7+
= note: required because of the requirements on the impl of `std::convert::Into<&[i8]>` for `&[u8]`
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)