From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../array-impls/alloc-traits-impls-length-32.rs | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs (limited to 'tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs') diff --git a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs new file mode 100644 index 000000000..b4a083636 --- /dev/null +++ b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs @@ -0,0 +1,48 @@ +// check-pass + +pub fn yes_vec_partial_eq_array() -> impl PartialEq<[B; 32]> +where + A: PartialEq, +{ + Vec::::new() +} + +pub fn yes_vec_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 32]> +where + A: PartialEq, +{ + Vec::::new() +} + +pub fn yes_array_into_vec() -> Vec { + [].into() +} + +pub fn yes_array_into_box() -> Box<[T]> { + [].into() +} + +use std::collections::VecDeque; + +pub fn yes_vecdeque_partial_eq_array() -> impl PartialEq<[B; 32]> +where + A: PartialEq, +{ + VecDeque::::new() +} + +pub fn yes_vecdeque_partial_eq_ref_array<'a, A, B>() -> impl PartialEq<&'a [B; 32]> +where + A: PartialEq, +{ + VecDeque::::new() +} + +pub fn yes_vecdeque_partial_eq_ref_mut_array<'a, A, B>() -> impl PartialEq<&'a mut [B; 32]> +where + A: PartialEq, +{ + VecDeque::::new() +} + +fn main() {} -- cgit v1.2.3