New Features

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

  • #4742 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

  • #4748 Provide completion for fields of builtin tuple types

  • #4677 Check type mismatch errors in const generic arguments in some cases

    const generic type mismatch

  • #4482 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

  • #4735 Make Specify type explicitly intention work with complex patterns like let (a, b) = some_expr

Fixes

  • #4757 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:
    • #4778 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
    • #4769 Fix name resolution in struct and tuple struct patterns. It should prevent unexpected multiple name resolution results in some cases
  • Type inference improvements:
    • #4741 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
    • #4778 Fix type inference inside tuple and struct tuple patterns after ..
  • #4759 Fix false positive Duplicate definitions (E0428) errors for macros 2.0

  • #4724 Parse _ as constant name properly

Full set of changes can be found here