mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-18 17:34:40 -04:00
22 lines
285 B
Rust
22 lines
285 B
Rust
// see issue #70529
|
|
struct A;
|
|
|
|
impl From<A> for [u8; 2] {
|
|
fn from(a: A) -> Self {
|
|
[0; 2]
|
|
}
|
|
}
|
|
|
|
impl From<A> for [u8; 3] {
|
|
fn from(a: A) -> Self {
|
|
[0; 3]
|
|
}
|
|
}
|
|
|
|
|
|
fn main() {
|
|
let a = A;
|
|
let [_, _] = a.into();
|
|
//~^ ERROR type annotations needed
|
|
}
|