Skip to content

Changelog #77 #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ trait Trait {
impl Trait for () {
type X = ();
fn foo(&self) {}┃

}
```

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion generated_config.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
21 changes: 19 additions & 2 deletions generated_features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
47 changes: 47 additions & 0 deletions thisweek/_posts/2021-05-17-changelog-77.adoc
Original file line number Diff line number Diff line change
@@ -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.