Stream: t-compiler/wg-rls-2.0

Topic: Type inference with `iter`


Laurențiu Nicola (Mar 03 2020 at 10:07, on Zulip):

Is type inference supposed to work with iter? I can't recall. For example, in

fn f(args: &[i32]) {
    for s in args.iter() {}
}

iter is resolved, but s doesn't have a type.

Laurențiu Nicola (Mar 03 2020 at 10:09, on Zulip):

Might be https://github.com/rust-analyzer/rust-analyzer/issues/2603.

Florian Diebold (Mar 03 2020 at 10:19, on Zulip):

yes, it probably is rust-lang/chalk#234 (at least I won't debug such cases further until that's fixed)

Last update: May 29 2020 at 15:40UTC