Add regression test for #71394
This commit is contained in:
parent
730c6f3e57
commit
8ea828be2f
2 changed files with 16 additions and 0 deletions
5
src/test/ui/suggestions/issue-71394-no-from-impl.rs
Normal file
5
src/test/ui/suggestions/issue-71394-no-from-impl.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fn main() {
|
||||
let data: &[u8] = &[0; 10];
|
||||
let _: &[i8] = data.into();
|
||||
//~^ ERROR the trait bound `&[i8]: std::convert::From<&[u8]>` is not satisfied
|
||||
}
|
||||
11
src/test/ui/suggestions/issue-71394-no-from-impl.stderr
Normal file
11
src/test/ui/suggestions/issue-71394-no-from-impl.stderr
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
error[E0277]: the trait bound `&[i8]: std::convert::From<&[u8]>` is not satisfied
|
||||
--> $DIR/issue-71394-no-from-impl.rs:3:25
|
||||
|
|
||||
LL | let _: &[i8] = data.into();
|
||||
| ^^^^ the trait `std::convert::From<&[u8]>` is not implemented for `&[i8]`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `std::convert::Into<&[i8]>` for `&[u8]`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue