Changelog #24

Commit: eb892d7
Release: 2020-05-11

New Features

  • #4043 Change Return Type to Result assist

    81538330 ea9c0300 936e 11ea 90d3 23525b545cd2
  • #4320 Run action and code lens now supports doc tests on functions

    81537179 18804800 936d 11ea 9e86 c7e6feaf38fd
  • #4411 Unwrap Block now works for single else:

    81539698 ea046c00 9370 11ea 899f 9e38238ee25b
  • #4166 rust-analyzer.cargo.target setting for specifying target tripple rust-analyzer uses for analysis.

  • #4328 rust-analyzer.checkOnSave.allFeatures setting (all by default) to run cargo check with all features enabled.

  • #4372 'rust-analyzer.inlayHints.enable' settings for conveniently disabling all inlay hints.

  • #4265 Change Visibility assist now works for tuple struct fields.

    81536600 22ee1200 936c 11ea 91be 37698d642fa7
  • #4316 always display full types on hover.

  • #4333 add installation instructions for Arch Linux (rust-analyzer is now packaged!).

  • #4296 fetch cfg`s from `build.rs.

  • #4329 in addition to PATH, look for cargo and rustc in ~/.cargo/bin.

  • #4414 highlight static mut as mutable, highlight name of the macro defined with macro_rules.

Fixes

  • #4419 fix panic in AstIdMap due to files with \r\n.

  • #4295 specify all rust-analyzer specific tokens and modifiers in package.json. You can use these custom types to tweak syntax highlighting for Rust.

  • #4305 correctly handle namespaces for structs in name resolution.

  • #4325 fix conversion to UTF-16 indexing for supplementary plane characters.

  • #4347 fix pattern exhaustiveness checks for ! type.

  • #4353, #4365 work around VS Code TextMate scope bugs, kudos to @georgewfraser for tracking those down!

  • #4359, #4409 fix panic in function signature.

  • #4346 fix visibility checks in rename for enum variants.

  • #4362 do not show runnables for main function outside of a binary target.

  • #4376, #4412, #4377, #4379 various type inference fixes.

Internal Improvements

  • #4300, #4303 cleanup attribute completion, making sure that each "completion contributor" is independent from the others.

  • #4321 rename ast::ImplItem → ast::AssocItem.

  • #4350 implement new API for assists infrastructure.

  • #4339 assert correct capitalization of labels in edits.

  • #4340, #4344 use the single SourceChange to describe all edits.

  • #4341 make it possible to sort assist by relevance without computing the action.

  • #4331 helpfully detect errors when parsing rust-analyzer fixtures.

  • #4366 unify lldb and native windows debugger handling.

  • #4175, #4389 introduce `HirDisplay`ko method for rendering source code & use it in Add Function and Specify Type Explicitly assists

  • #4418 refactor conversion between LSP and rust-analyzer native types.