New Features

  • Parser improvements:
    • Parse incomplete reference types. Now a in fn foo(a: &) has some reference type
    • Process lifetime and type parameters in any order while parsing. Now the plugin can correctly parse fn foo<T, 'a>() {}, and provide error message about wrong order of parameters.
    • Unify plugin grammar rules for items inside blocks, extern blocks and impl blocks. Now you can write any item in any type of block without syntax errors, and the plugin highlights those of them that are not allowed in the particular block.
    • Optimize plugin parser and speed up the parsing phase up to 20%. From user side, it should decrease indexing time
  • Collapse field initialization in struct literal into shorthand form after rename if possible (by @t-kameyama)

  • Provide Generate Constructor action (Code | Generate) inside impl block (by @Kobzol)

  • Generate default values for constants by Implement Members quick fix instead of unimplemented!() (by @Kobzol)
  • Add Browse Console History action for Rust REPL. You can open Rust REPL console via Tools | Rust REPL action

Performance Improvements

  • Store macro expansion results produced by experimental macro expansion engine into compressed binary files. It should significantly decrease occupied disk space and slightly speed up macro expansion process because of less interaction with the filesystem. You can enable new experimental macro expansion engine via Preferences | Languages & Frameworks | Rust | Expand declarative macros option

Fixes

  • Disambiguate inherent/trait methods and associated items while type inference
  • Do not change associated functions while Convert to struct refactoring (by @Kobzol)
  • Provide missing versions for indexers. It should prevent sporadic errors in different subsystems after lexer/parser changes

Full set of changes can be found here