rust-lang/project-rfc-2229

Account for capture kind in trait migration

Closed this issue · 1 comments

Currently the code that does checks for trait bounds that won't be met in 2021 doesn't include the capture kind in the type of the captured path.

For computing the capture kind as per 2018:

  • If move closure, then capture kind = ByValue
  • else, Max capture kind according to Imm < UniqueImm < Mut < ByValue

This was fixed by rust-lang/rust#86869