Skip to content

Commit

Permalink
Test arrays containing non-Copy element too
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 2, 2021
1 parent 18c09df commit 3dfd33a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ fn test_array() {

let ref_slice: &[u8] = &[0; 40];
let _ = quote!(#(#ref_slice #ref_slice)*);

let array: [X; 2] = [X, X]; // !Copy
let _ = quote!(#(#array #array)*);

let ref_array: &[X; 2] = &[X, X];
let _ = quote!(#(#ref_array #ref_array)*);

let ref_slice: &[X] = &[X, X];
let _ = quote!(#(#ref_slice #ref_slice)*);
}

#[test]
Expand Down

0 comments on commit 3dfd33a

Please sign in to comment.