diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/traits/new-solver/tait-eq-proj.rs | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/new-solver/tait-eq-proj.rs')
-rw-r--r-- | tests/ui/traits/new-solver/tait-eq-proj.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/ui/traits/new-solver/tait-eq-proj.rs b/tests/ui/traits/new-solver/tait-eq-proj.rs deleted file mode 100644 index 01ef2ec95..000000000 --- a/tests/ui/traits/new-solver/tait-eq-proj.rs +++ /dev/null @@ -1,35 +0,0 @@ -// compile-flags: -Ztrait-solver=next -// check-pass - -#![feature(type_alias_impl_trait)] - -type Tait = impl Iterator<Item = impl Sized>; - -/* - -Consider the goal - AliasRelate(Tait, <[i32; 32] as IntoIterator>::IntoIter) -which is registered on the line above. - -A. SubstRelate - fails (of course). - -B. NormalizesToRhs - Tait normalizes-to <[i32; 32] as IntoIterator>::IntoIter - * infer definition - Tait := <[i32; 32] as IntoIterator>::IntoIter - -C. NormalizesToLhs - <[i32; 32] as IntoIterator>::IntoIter normalizes-to Tait - * Find impl candidate, after substitute - std::array::IntoIter<i32, 32> - * Equate std::array::IntoIter<i32, 32> and Tait - * infer definition - Tait := std::array::IntoIter<i32, 32> - -B and C are not equal, but they are equivalent modulo normalization. - -We get around this by evaluating both the NormalizesToRhs and NormalizesToLhs -goals together. Essentially: - A alias-relate B if A normalizes-to B and B normalizes-to A. - -*/ - -fn a(_: Tait) { - let _: Tait = IntoIterator::into_iter([0i32; 32]); -} - -fn main() {} |