From 89e8cc918f6af69f60a7c4a8eecc32f1eca46921 Mon Sep 17 00:00:00 2001 From: lcnr Date: Thu, 8 Feb 2024 10:20:15 +0100 Subject: [PATCH] one must imagine ci happy --- .../impl-trait/recursive-coroutine-boxed.next.stderr | 10 ++++++++-- tests/ui/impl-trait/recursive-coroutine-boxed.rs | 1 + .../type-alias-impl-trait-tuple.next.stderr | 11 +++++------ .../type-alias-impl-trait-tuple.rs | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr b/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr index 0d9e2ee8469e8..fee3b86034af1 100644 --- a/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr +++ b/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr @@ -3,7 +3,7 @@ error[E0282]: type annotations needed | LL | let mut gen = Box::pin(foo()); | ^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `Box` -LL | +... LL | let mut r = gen.as_mut().resume(()); | ------ type must be known at this point | @@ -12,6 +12,12 @@ help: consider specifying the generic argument LL | let mut gen = Box::::pin(foo()); | +++++ -error: aborting due to 1 previous error +error[E0282]: type annotations needed + --> $DIR/recursive-coroutine-boxed.rs:10:32 + | +LL | let mut gen = Box::pin(foo()); + | ^^^^^ cannot infer type for opaque type `impl Coroutine` + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.rs b/tests/ui/impl-trait/recursive-coroutine-boxed.rs index 2c5d679994f07..3f677986c137c 100644 --- a/tests/ui/impl-trait/recursive-coroutine-boxed.rs +++ b/tests/ui/impl-trait/recursive-coroutine-boxed.rs @@ -9,6 +9,7 @@ fn foo() -> impl Coroutine { || { let mut gen = Box::pin(foo()); //[next]~^ ERROR type annotations needed + //[next]~| ERROR type annotations needed let mut r = gen.as_mut().resume(()); while let CoroutineState::Yielded(v) = r { yield v; diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.next.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.next.stderr index 1bfea8a0e3003..b380dc66f03fc 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.next.stderr +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.next.stderr @@ -4,13 +4,12 @@ error[E0284]: type annotations needed: cannot satisfy `Foo == _` LL | Blah { my_foo: make_foo(), my_u8: 12 } | ^^^^^^^^^^ cannot satisfy `Foo == _` -error[E0282]: type annotations needed - --> $DIR/type-alias-impl-trait-tuple.rs:24:28 +error[E0284]: type annotations needed: cannot satisfy `Foo == _` + --> $DIR/type-alias-impl-trait-tuple.rs:25:10 | -LL | fn into_inner(self) -> (Foo, u8, Foo) { - | ^^^^^^^^^^^^^^ cannot infer type for tuple `(Foo, u8, Foo)` +LL | (self.my_foo, self.my_u8, make_foo()) + | ^^^^^^^^^^^ cannot satisfy `Foo == _` error: aborting due to 2 previous errors -Some errors have detailed explanations: E0282, E0284. -For more information about an error, try `rustc --explain E0282`. +For more information about this error, try `rustc --explain E0284`. diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs index 2f25ab4df90ee..7bf899a96be12 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs @@ -22,8 +22,8 @@ impl Blah { //[next]~^ ERROR type annotations needed: cannot satisfy `Foo == _` } fn into_inner(self) -> (Foo, u8, Foo) { - //[next]~^ ERROR type annotations needed (self.my_foo, self.my_u8, make_foo()) + //[next]~^ ERROR type annotations needed: cannot satisfy `Foo == _` } }