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/generic-associated-types/issue-101020.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/generic-associated-types/issue-101020.rs')
-rw-r--r-- | src/test/ui/generic-associated-types/issue-101020.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/test/ui/generic-associated-types/issue-101020.rs b/src/test/ui/generic-associated-types/issue-101020.rs deleted file mode 100644 index 80d0fa5ad..000000000 --- a/src/test/ui/generic-associated-types/issue-101020.rs +++ /dev/null @@ -1,35 +0,0 @@ -pub trait LendingIterator { - type Item<'a> - where - Self: 'a; - - fn consume<F>(self, _f: F) - where - Self: Sized, - for<'a> Self::Item<'a>: FuncInput<'a, Self::Item<'a>>, - { - } -} - -impl<I: LendingIterator + ?Sized> LendingIterator for &mut I { - type Item<'a> = I::Item<'a> where Self: 'a; -} -struct EmptyIter; -impl LendingIterator for EmptyIter { - type Item<'a> = &'a mut () where Self:'a; -} -pub trait FuncInput<'a, F> -where - F: Foo<Self>, - Self: Sized, -{ -} -impl<'a, T, F: 'a> FuncInput<'a, F> for T where F: Foo<T> {} -trait Foo<T> {} - -fn map_test() { - (&mut EmptyIter).consume(()); - //~^ ERROR the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satisfied -} - -fn main() {} |