New Features

  • Add Lift return inspection. Now the plugin highlights if and match expressions where return can be lifted out of branches of the expression.

  • Treat todo macro calls as todo items, i.e they have the corresponding highlighting and can be found in TODO tool window

    highlight todo macro

  • Provide completion for fields of builtin tuple types
  • Check type mismatch errors in const generic arguments in some cases

    const generic type mismatch

  • Support unstable attribute for items. Now if you use item marked with unstable attribute without the corresponding feature, the plugin highlights the usage as an error and suggest quick fix in case of nightly toolchain
  • Make Specify type explicitly intention work with complex patterns like let (a, b) = some_expr

Fixes

  • Optimize Show Usages (Ctrl+Alt+F7/Cmd+Alt+F7) for associated items. It should significantly speed up search of associated items with commonly used names like new

  • Improve patterns support:
    • Fix parser rule for range patterns. Now it should correctly process patterns like X..=Y where X is some variable. Previously, it leads to syntax error
    • Fix name resolution in struct and tuple struct patterns. It should prevent unexpected multiple name resolution results in some cases
  • Type inference improvements:
    • Take into account builtin implementation of Clone and Copy traits for tuple types while type inference. Also, consider that generic types with #[derive(Copy)] implements Copy traits only when all type components implement Copy. It should fix various bugs in type inference, type mismatch and borrow checker inspections for the corresponding types
    • Fix type inference inside tuple and struct tuple patterns after ..
  • Parse _ as constant name properly

Full set of changes can be found here