From b59c958ba6d1a6834c8915ce8146f9a8e81557b6 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 17 Feb 2022 17:21:48 -0800 Subject: [PATCH] Bless up --- .../bugs/issue-88382.stderr | 8 ++-- .../higher-rank-trait-bounds/issue-60283.rs | 4 +- .../issue-60283.stderr | 42 ------------------- 3 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 src/test/ui/higher-rank-trait-bounds/issue-60283.stderr 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 d06c3ec8de7..ce196dcbd86 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88382.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-88382.stderr @@ -2,18 +2,18 @@ error[E0631]: type mismatch in function arguments --> $DIR/issue-88382.rs:28:40 | LL | do_something(SomeImplementation(), test); - | ------------ ^^^^ expected signature of `for<'a> fn(&mut ::Iterator<'a>) -> _` + | ------------ ^^^^ expected signature of `for<'r> fn(&'r mut std::iter::Empty) -> _` | | | required by a bound introduced by this call ... LL | fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {} - | ------------------------------------------------- found signature of `for<'r> fn(&'r mut std::iter::Empty) -> _` + | ------------------------------------------------- found signature of `for<'r, 'a> fn(&'r mut <_ as Iterable>::Iterator<'a>) -> _` | note: required by a bound in `do_something` - --> $DIR/issue-88382.rs:22:56 + --> $DIR/issue-88382.rs:22:48 | LL | fn do_something(i: I, mut f: impl for<'a> Fn(&mut I::Iterator<'a>)) { - | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `do_something` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `do_something` error: aborting due to previous error diff --git a/src/test/ui/higher-rank-trait-bounds/issue-60283.rs b/src/test/ui/higher-rank-trait-bounds/issue-60283.rs index c63b1544a53..05315b3f9f5 100644 --- a/src/test/ui/higher-rank-trait-bounds/issue-60283.rs +++ b/src/test/ui/higher-rank-trait-bounds/issue-60283.rs @@ -1,3 +1,5 @@ +// check-pass + pub trait Trait<'a> { type Item; } @@ -15,6 +17,4 @@ where fn main() { foo((), drop) - //~^ ERROR type mismatch in function arguments - //~| ERROR size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time } diff --git a/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr b/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr deleted file mode 100644 index 34893cd8f19..00000000000 --- a/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr +++ /dev/null @@ -1,42 +0,0 @@ -error[E0631]: type mismatch in function arguments - --> $DIR/issue-60283.rs:17:13 - | -LL | foo((), drop) - | --- ^^^^ - | | | - | | expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _` - | | found signature of `fn(()) -> _` - | required by a bound introduced by this call - | -note: required by a bound in `foo` - --> $DIR/issue-60283.rs:12:16 - | -LL | pub fn foo(_: T, _: F) - | --- required by a bound in this -... -LL | F: for<'a> FnMut(>::Item), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo` - -error[E0277]: the size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time - --> $DIR/issue-60283.rs:17:13 - | -LL | foo((), drop) - | --- ^^^^ doesn't have a size known at compile-time - | | - | required by a bound introduced by this call - | - = help: the trait `Sized` is not implemented for `<() as Trait<'_>>::Item` -note: required by a bound in `std::mem::drop` - --> $SRC_DIR/core/src/mem/mod.rs:LL:COL - | -LL | pub fn drop(_x: T) {} - | ^ required by this bound in `std::mem::drop` -help: consider further restricting the associated type - | -LL | fn main() where <() as Trait<'_>>::Item: Sized { - | ++++++++++++++++++++++++++++++++++++ - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0277, E0631. -For more information about an error, try `rustc --explain E0277`.