Stream: t-compiler/rust-analyzer

Topic: Type inference with `iter`


Laurențiu (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 (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: Jul 24 2021 at 19:30UTC