diff options
Diffstat (limited to 'src/test/ui/generic-associated-types/bugs')
6 files changed, 3 insertions, 114 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-86218.rs b/src/test/ui/generic-associated-types/bugs/issue-86218.rs deleted file mode 100644 index 3a2d758e7..000000000 --- a/src/test/ui/generic-associated-types/bugs/issue-86218.rs +++ /dev/null @@ -1,26 +0,0 @@ -// check-fail -// known-bug: #86218 - -// This should pass, but seems to run into a TAIT issue. - -#![feature(type_alias_impl_trait)] - -pub trait Stream { - type Item; -} - -impl Stream for () { - type Item = i32; -} - -trait Yay<AdditionalValue> { - type InnerStream<'s>: Stream<Item = i32> + 's; - fn foo<'s>() -> Self::InnerStream<'s>; -} - -impl<'a> Yay<&'a ()> for () { - type InnerStream<'s> = impl Stream<Item = i32> + 's; - fn foo<'s>() -> Self::InnerStream<'s> { todo!() } -} - -fn main() {} diff --git a/src/test/ui/generic-associated-types/bugs/issue-86218.stderr b/src/test/ui/generic-associated-types/bugs/issue-86218.stderr deleted file mode 100644 index de1b464a4..000000000 --- a/src/test/ui/generic-associated-types/bugs/issue-86218.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0477]: the type `<() as Yay<&'a ()>>::InnerStream<'s>` does not fulfill the required lifetime - --> $DIR/issue-86218.rs:22:28 - | -LL | type InnerStream<'s> = impl Stream<Item = i32> + 's; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: type must outlive the lifetime `'s` as defined here as required by this binding - --> $DIR/issue-86218.rs:22:22 - | -LL | type InnerStream<'s> = impl Stream<Item = i32> + 's; - | ^^ - -error: unconstrained opaque type - --> $DIR/issue-86218.rs:22:28 - | -LL | type InnerStream<'s> = impl Stream<Item = i32> + 's; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: `InnerStream` must be used in combination with a concrete type within the same module - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0477`. diff --git a/src/test/ui/generic-associated-types/bugs/issue-88382.stderr b/src/test/ui/generic-associated-types/bugs/issue-88382.stderr index c5fd58096..a9a70bb71 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88382.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-88382.stderr @@ -9,8 +9,8 @@ LL | do_something(SomeImplementation(), test); LL | fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {} | ------------------------------------------------- found signature defined here | - = note: expected function signature `for<'r> fn(&'r mut std::iter::Empty<usize>) -> _` - found function signature `for<'a, 'r> fn(&'r mut <_ as Iterable>::Iterator<'a>) -> _` + = note: expected function signature `for<'a> fn(&'a mut std::iter::Empty<usize>) -> _` + found function signature `for<'a, 'b> fn(&'b mut <_ as Iterable>::Iterator<'a>) -> _` note: required by a bound in `do_something` --> $DIR/issue-88382.rs:20:48 | diff --git a/src/test/ui/generic-associated-types/bugs/issue-89008.rs b/src/test/ui/generic-associated-types/bugs/issue-89008.rs deleted file mode 100644 index 012aa8df2..000000000 --- a/src/test/ui/generic-associated-types/bugs/issue-89008.rs +++ /dev/null @@ -1,43 +0,0 @@ -// check-fail -// edition:2021 -// known-bug: #88908 - -// This should pass, but seems to run into a TAIT bug. - -#![feature(type_alias_impl_trait)] - -use std::future::Future; - -trait Stream { - type Item; -} - -struct Empty<T>(T); -impl<T> Stream for Empty<T> { - type Item = (); -} -fn empty<T>() -> Empty<T> { - todo!() -} - -trait X { - type LineStream<'a, Repr>: Stream<Item = Repr> where Self: 'a; - - type LineStreamFut<'a,Repr>: Future<Output = Self::LineStream<'a, Repr>> where Self: 'a; - - fn line_stream<'a,Repr>(&'a self) -> Self::LineStreamFut<'a,Repr>; -} - -struct Y; - -impl X for Y { - type LineStream<'a, Repr> = impl Stream<Item = Repr>; - - type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>> ; - - fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { - async {empty()} - } -} - -fn main() {} diff --git a/src/test/ui/generic-associated-types/bugs/issue-89008.stderr b/src/test/ui/generic-associated-types/bugs/issue-89008.stderr deleted file mode 100644 index 3f72734ef..000000000 --- a/src/test/ui/generic-associated-types/bugs/issue-89008.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0271]: type mismatch resolving `<Empty<_> as Stream>::Item == Repr` - --> $DIR/issue-89008.rs:38:43 - | -LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { - | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Empty<_> as Stream>::Item == Repr` - | | - | this type parameter - | -note: expected this to be `()` - --> $DIR/issue-89008.rs:17:17 - | -LL | type Item = (); - | ^^ - = note: expected unit type `()` - found type parameter `Repr` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/generic-associated-types/bugs/issue-91762.rs b/src/test/ui/generic-associated-types/bugs/issue-91762.rs index 796935cc0..dec668bec 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-91762.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-91762.rs @@ -1,7 +1,7 @@ // check-fail // known-bug -// We almost certaintly want this to pass, but +// We almost certainly want this to pass, but // it's particularly difficult currently, because we need a way of specifying // that `<Self::Base as Functor>::With<T> = Self` without using that when we have // a `U`. See `https://github.com/rust-lang/rust/pull/92728` for a (hacky) |