diff --git a/generated_assists.adoc b/generated_assists.adoc index 07c21e57..927a13a3 100644 --- a/generated_assists.adoc +++ b/generated_assists.adoc @@ -58,7 +58,6 @@ trait Trait { impl Trait for () { type X = (); fn foo(&self) {}┃ - } ``` @@ -649,7 +648,7 @@ impl Default for Version { [discrete] === `generate_default_from_new` -**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_default_from_new.rs#L11[generate_default_from_new.rs] +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_default_from_new.rs#L13[generate_default_from_new.rs] Generates default implementation from new method. @@ -1005,7 +1004,7 @@ impl MyStruct { [discrete] === `generate_new` -**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_new.rs#L11[generate_new.rs] +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_new.rs#L10[generate_new.rs] Adds a new inherent impl for a type. @@ -1777,7 +1776,7 @@ fn main() { === `replace_unwrap_with_match` **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_unwrap_with_match.rs#L18[replace_unwrap_with_match.rs] -Replaces `unwrap` a `match` expression. Works for Result and Option. +Replaces `unwrap` with a `match` expression. Works for Result and Option. .Before ```rust diff --git a/generated_config.adoc b/generated_config.adoc index e28423e9..f7055820 100644 --- a/generated_config.adoc +++ b/generated_config.adoc @@ -1,4 +1,4 @@ -[[rust-analyzer.assist.importMergeBehavior]]rust-analyzer.assist.importMergeBehavior (default: `"full"`):: +[[rust-analyzer.assist.importMergeBehavior]]rust-analyzer.assist.importMergeBehavior (default: `"crate"`):: + -- The strategy to use when inserting new imports or merging imports. diff --git a/generated_features.adoc b/generated_features.adoc index fb9ab53e..c0632147 100644 --- a/generated_features.adoc +++ b/generated_features.adoc @@ -316,7 +316,7 @@ mod tests { And the auto import completions, enabled with the `rust-analyzer.completion.autoimport.enable` setting and the corresponding LSP client capabilities. Those are the additional completion options with automatic `use` import and options from all project importable items, -fuzzy matched agains the completion imput. +fuzzy matched against the completion input. image::https://user-images.githubusercontent.com/48062697/113020667-b72ab880-917a-11eb-8778-716cf26a0eb3.gif[] @@ -426,7 +426,7 @@ image::https://user-images.githubusercontent.com/48062697/113171066-105c2000-923 // IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository == Parent Module -**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/parent_module.rs#L12[parent_module.rs] +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/parent_module.rs#L14[parent_module.rs] Navigates to the parent module of the current module. @@ -606,6 +606,23 @@ be parsed as a valid structural search and replace rule. ``` +// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository + +== View Crate Graph +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/view_crate_graph.rs#L10[view_crate_graph.rs] + +Renders the currently loaded crate graph as an SVG graphic. Requires the `dot` tool, which +is part of graphviz, to be installed. + +Only workspace crates are included, no crates.io dependencies or sysroot crates. + +|=== +| Editor | Action Name + +| VS Code | **Rust Analyzer: View Crate Graph** +|=== + + // IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository == View Hir diff --git a/thisweek/_posts/2021-05-17-changelog-77.adoc b/thisweek/_posts/2021-05-17-changelog-77.adoc new file mode 100644 index 00000000..aace2a6c --- /dev/null +++ b/thisweek/_posts/2021-05-17-changelog-77.adoc @@ -0,0 +1,47 @@ += Changelog #77 +:sectanchors: +:page-layout: post + +Commit: commit:b82458818d44dfe5b4b5db38d8113e3f3194506e[] + +Release: release:2021-05-17[] + +== Sponsors + +**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or +https://github.com/sponsors/rust-analyzer[GitHub Sponsors]. + +== New Features + +* pr:8791[] auto-indent use tree lists: ++ +image::https://user-images.githubusercontent.com/1786438/117665627-53e16c80-b1a3-11eb-8906-1b88b394367b.gif[] +* pr:8801[], pr:8807[] allow viewing the crate graph in a webview: ++ +image::https://user-images.githubusercontent.com/1786438/117831361-c4a48980-b274-11eb-9276-240cdf6919aa.png[] +* pr:8799[], pr:8813[] add support for array lengths in types. + +== Fixes + +* pr:8802[] (first contribution) keep comments and attributes when extracting struct from enum variant. +* pr:8819[] (first contribution) use package root as `cargo check` working directory. +* pr:8398[] fix inference with conditionally compiled tails. +* pr:8800[] make "Pull assignment up" assist work in more cases. +* pr:8805[] use Cargo target name as crate name. +* pr:8806[], pr:8808[] strip delimiters from function-like macro invocations. +* pr:8812[] fix dependencies of build scripts. +* pr:8820[] return absolute paths in `find_path` if crate start is ambiguous. +* pr:8823[] enable task lists in `pulldown_cmark`. +* pr:8814[] keep doc comments and outer attributes in "Move module to file" assist. +* pr:8830[] implement bulit-in `concat_idents!` macro. +* pr:8831[] apply `async` semantic token modifier to the `async`/`await` keywords. +* pr:8840[] fix false positive "Missing match arm" when a tuple pattern is shorter than scrutinee type. +* pr:8845[] add default type parameters on "Generate `Default` from `new` function". +* pr:8848[] attach comments to `ast::Impl`. +* pr:8853[] tag `Self` in impls as a type alias. + +== Internal Improvements + +* pr:8793[], pr:8825[] (first contributions) fix a couple of typos. +* pr:8798[] use modern dependency resolver. +* pr:8796[] rewrite `#[derive]` removal to be based on AST (take 2). +* pr:8837[], pr:8838[], pr:8854[] use mutable syntax trees in more places.