File tree 3 files changed +6
-48
lines changed
generic-associated-types/bugs
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
2
2
--> $DIR/issue-88382.rs:28:40
3
3
|
4
4
LL | 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 >) -> _`
6
6
| |
7
7
| required by a bound introduced by this call
8
8
...
9
9
LL | 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 >) -> _`
11
11
|
12
12
note: required by a bound in `do_something`
13
- --> $DIR/issue-88382.rs:22:56
13
+ --> $DIR/issue-88382.rs:22:48
14
14
|
15
15
LL | 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`
17
17
18
18
error: aborting due to previous error
19
19
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+
1
3
pub trait Trait < ' a > {
2
4
type Item ;
3
5
}
15
17
16
18
fn main ( ) {
17
19
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
20
20
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments