New Features

  • Support 2019.2 EAPs

  • Language support improvements:
    • Support postfix await syntax
    • Parse static keyword in generator expressions correctly
  • Detection of new compiler errors: E0040, E0081, E0120 and E0184 (by @mibac138)

  • Completion improvements:
    • Take into account type information to sort suggested items while completion

    • Implement deref postfix completion to add * before selected expression (by @mibac138)

    • Add completion for deprecated attribute

  • Debugger improvements:
    • Provide GDB formatters for HashMap and HashSet collections. Note, these formatters require Rust 1.33 or above to work properly
    • Display enum values correctly while debugging with GDB
    • Provide common IDE features (e.g. name resolution and completion) in Evaluate Expression and New Watch fields. Note, Evaluate Expression feature is not fully supported and works in certain cases only

  • #3738 Improve Convert to named fields refactoring. Now it allows converting all usages of the struct to the corresponding representation (by @rrevenantt)

  • #3779 Automatically detect stdlib sources in rustc sysroot even if rustup is absent

  • #3796 Take into account constants of primitive types: bool, f32/64, char and &str in Match Check inspection. In addition, the inspection can evaluate constant boolean expressions while analysis (constant functions are not supported) like it has already implemented for integer expressions

  • #3819 Now it’s possible to filter usage of variables and fields by read/write access png

  • #3520 Support more types from stdlib, like Rc, Arc, Cell, RefCell, etc., in Add missing fields quick fix (by @Kobzol)

  • #3826 Notify a user when a file is not included in the project structure. It should simplify to find out the reason why common IDE features (e.g., name resolution, completion, etc.) don’t work properly in the file (by @Kobzol)

  • #3778 Add Flatten use statements intention (by @mibac138)

  • #3745 Allow folding of macros and macro expansion branches (by @ice1000)

  • #3736 Add Show the result of macro expansion intention to invoke cargo expand command. If you don’t have the corresponding package, the plugin shows a notification to install cargo-expand binary in one click

  • #3827 Update Extract function dialog. Now it allows changing parameter names. Also, it validates creating function name (by @Kobzol)

Fixes

  • Name resolution fixes:
    • Fix name resolution of uniform paths
    • Properly process atom use items like use crate_name for 2018 edition. Previously such items broke name resolution of all items imported from the corresponding crate
    • Take into account alias of extern crate item for 2018 edition
    • Correctly detect edition of stdlib crates. It should fix unresolved references to stdlib items like BTreeMap and LinkedList
    • Perform name resolution properly when path contains primitive type name as qualifier like f64::INFINITY
    • Make GoTo Declaration, Find usages and Type Declaration actions work correctly for self parameter (by @vlad20012 & @mibac138)
  • Performance improvements:
    • Significantly speed up Find usages action especially for private and local items
    • Fix possible UI freezes caused by parameter info popup
    • Show large macro expansions faster
  • False positive annotation fixes:
    • Fix a lot of false positive error annotation like Expected Vec, found Vec for rust-lang/rust project
    • Fix false positive error annotation produced by Dropping reference inspection (by @mibac138)
    • Perform better analysis by Match Check inspection on complex patterns with multiple types
  • Type inference improvements:
    • Take into account Deref trait implementation while binary expression type inference
    • Use proper rules of match ergonomics to correctly infer types of variable bindings in all cases (previously not all rules were supported)
  • Provides navigation links from backtrace to project sources for crates with 2018 edition. This feature has been working for 2015 edition crates for a long time but was broken for 2018 edition

  • Highlight const and static items properly

  • Better brace matching while deletion and inside macro calls (by @rrevenantt)

  • More precise code highlighting in doc tests

  • #3800 Parse 4 slashes in doc comments properly (by @rrevenantt)

Internal Improvements

  • Provide new API to evaluate constant expressions. It’s already used in Match Check inspection