diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/const-generics/generic_const_exprs/issue-99705.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/const-generics/generic_const_exprs/issue-99705.rs')
-rw-r--r-- | src/test/ui/const-generics/generic_const_exprs/issue-99705.rs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/test/ui/const-generics/generic_const_exprs/issue-99705.rs b/src/test/ui/const-generics/generic_const_exprs/issue-99705.rs deleted file mode 100644 index 75b57b621..000000000 --- a/src/test/ui/const-generics/generic_const_exprs/issue-99705.rs +++ /dev/null @@ -1,33 +0,0 @@ -// check-pass -#![crate_type = "lib"] -#![feature(generic_const_exprs)] -#![allow(incomplete_features)] -pub trait MyIterator { - type Output; -} - -pub trait Foo { - const ABC: usize; -} - -pub struct IteratorStruct<const N: usize>{ - -} - -pub struct Bar<const N: usize> { - pub data: [usize; N] -} - -impl<const N: usize> MyIterator for IteratorStruct<N> { - type Output = Bar<N>; -} - -pub fn test1<T: Foo>() -> impl MyIterator<Output = Bar<{T::ABC}>> where [(); T::ABC]: Sized { - IteratorStruct::<{T::ABC}>{} -} - -pub trait Baz<const N: usize>{} -impl<const N: usize> Baz<N> for Bar<N> {} -pub fn test2<T: Foo>() -> impl MyIterator<Output = impl Baz<{ T::ABC }>> where [(); T::ABC]: Sized { - IteratorStruct::<{T::ABC}>{} -} |