diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/generic-associated-types/bugs/issue-88382.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/generic-associated-types/bugs/issue-88382.rs')
-rw-r--r-- | src/test/ui/generic-associated-types/bugs/issue-88382.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-88382.rs b/src/test/ui/generic-associated-types/bugs/issue-88382.rs deleted file mode 100644 index 8f8cc4523..000000000 --- a/src/test/ui/generic-associated-types/bugs/issue-88382.rs +++ /dev/null @@ -1,29 +0,0 @@ -// check-fail -// known-bug: #88382 - -// This should pass, but has a missed normalization due to HRTB. - -trait Iterable { - type Iterator<'a> where Self: 'a; - fn iter(&self) -> Self::Iterator<'_>; -} - -struct SomeImplementation(); - -impl Iterable for SomeImplementation { - type Iterator<'a> = std::iter::Empty<usize>; - fn iter(&self) -> Self::Iterator<'_> { - std::iter::empty() - } -} - -fn do_something<I: Iterable>(i: I, mut f: impl for<'a> Fn(&mut I::Iterator<'a>)) { - f(&mut i.iter()); -} - -fn main() { - do_something(SomeImplementation(), |_| ()); - do_something(SomeImplementation(), test); -} - -fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {} |