File tree Expand file tree Collapse file tree 3 files changed +6
-48
lines changed
generic-associated-types/bugs Expand file tree Collapse file tree 3 files changed +6
-48
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,18 @@ error[E0631]: type mismatch in function arguments
22 --> $DIR/issue-88382.rs:28:40
33 |
44LL | do_something(SomeImplementation(), test);
5- | ------------ ^^^^ expected signature of `for<'a > fn(&mut <SomeImplementation as Iterable>::Iterator<'a >) -> _`
5+ | ------------ ^^^^ expected signature of `for<'r > fn(&'r mut std::iter::Empty<usize >) -> _`
66 | |
77 | required by a bound introduced by this call
88...
99LL | fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {}
10- | ------------------------------------------------- found signature of `for<'r> fn(&'r mut std::iter::Empty<usize >) -> _`
10+ | ------------------------------------------------- found signature of `for<'r, 'a > fn(&'r mut <_ as Iterable>::Iterator<'a >) -> _`
1111 |
1212note: required by a bound in `do_something`
13- --> $DIR/issue-88382.rs:22:56
13+ --> $DIR/issue-88382.rs:22:48
1414 |
1515LL | fn do_something<I: Iterable>(i: I, mut f: impl for<'a> Fn(&mut I::Iterator<'a>)) {
16- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `do_something`
16+ | ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `do_something`
1717
1818error: aborting due to previous error
1919
Original file line number Diff line number Diff line change 1+ // check-pass
2+
13pub trait Trait < ' a > {
24 type Item ;
35}
1517
1618fn main ( ) {
1719 foo ( ( ) , drop)
18- //~^ ERROR type mismatch in function arguments
19- //~| ERROR size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time
2020}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments