Skip to content

Changelog #111 #177

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
Jan 10, 2022
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
6 changes: 3 additions & 3 deletions generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fn foo() -> i32 { 42i32 }

[discrete]
=== `add_turbo_fish`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_turbo_fish.rs#L9[add_turbo_fish.rs]
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_turbo_fish.rs#L10[add_turbo_fish.rs]

Adds `::<_>` to a call of a generic method or function.

Expand Down Expand Up @@ -1610,7 +1610,7 @@ fn handle(action: Action) {

[discrete]
=== `move_arm_cond_to_match_guard`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_guard.rs#L77[move_guard.rs]
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_guard.rs#L79[move_guard.rs]

Moves if expression from match arm body into a guard.

Expand Down Expand Up @@ -1682,7 +1682,7 @@ fn t() {}

[discrete]
=== `move_guard_to_arm_body`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_guard.rs#L9[move_guard.rs]
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_guard.rs#L11[move_guard.rs]

Moves match guard into match arm body.

Expand Down
12 changes: 12 additions & 0 deletions generated_config.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[[rust-analyzer.assist.exprFillDefault]]rust-analyzer.assist.exprFillDefault (default: `"todo"`)::
+
--
Placeholder for missing expressions in assists.
--
[[rust-analyzer.assist.importGranularity]]rust-analyzer.assist.importGranularity (default: `"crate"`)::
+
--
Expand Down Expand Up @@ -455,6 +460,13 @@ Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScri
Internal config, path to proc-macro server executable (typically,
this is rust-analyzer itself, but we override this in tests).
--
[[rust-analyzer.procMacro.ignored]]rust-analyzer.procMacro.ignored (default: `{}`)::
+
--
These proc-macros will be ignored when trying to expand them.

This config takes a map of crate names with the exported proc-macro names to ignore as values.
--
[[rust-analyzer.runnables.overrideCargo]]rust-analyzer.runnables.overrideCargo (default: `null`)::
+
--
Expand Down
2 changes: 1 addition & 1 deletion generated_diagnostic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This diagnostic is triggered if a function is invoked with an incorrect amount o


=== missing-fields
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_fields.rs#L11[missing_fields.rs]
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_fields.rs#L18[missing_fields.rs]

This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.

Expand Down
54 changes: 54 additions & 0 deletions thisweek/_posts/2022-01-10-changelog-111.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
= Changelog #111
:sectanchors:
:page-layout: post

Commit: commit:0f8c96c92689af8378dbe9f466c6bf15a3a27458[] +
Release: release:2022-01-10[]

== Sponsors

**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or
https://github.com/sponsors/rust-analyzer[GitHub Sponsors].

== New Features

* pr:11112[] evaluate constants in array repeat expression:
+
image::https://user-images.githubusercontent.com/308347/148725908-da1a03de-83dd-4e4e-afd1-b3ae326e298b.png[]
* pr:11193[] add setting to replace specific proc-macros with dummy expanders:
+
image::https://user-images.githubusercontent.com/3757771/148529907-12f2442d-627a-4484-8e16-aa903a249bc8.gif[]
* pr:11208[] expand attribute macros on impl and trait items.
* pr:11214[] poke user when supplying faulty configurations.
* pr:11145[] add setting to use reasonable default expressions when filling missing fields.

== Fixes

* pr:11107[] (first contribution) fix generic type substitution when implementing trait with associated type.
* pr:11061[] support `Move if to guard` on `if`-`else` chains.
* pr:11178[] keep block modifiers in `Replace match with if let`.
* pr:11184[] pass through mutable parameter references when extracting a function.
* pr:11195[] pass through reference modifiers when extracting a variable.
* pr:11190[] improve function parameter completion.
* pr:11200[], pr:11207[] always put a space after `dyn` and `impl` in macro pretty-printing.
* pr:11201[] fix completions not considering ancestor items for attribute search.
* pr:11202[] fix hang in `apply_demorgan` assist.
* pr:11204[] shorten replacement path in `replace_qualified_name_with_use`.
* pr:11211[] fix parsing of `#[derive]` paths.
* pr:11218[] don't insert `&mut` twice in parameter completion.
* pr:11194[] don't include lifetime when generating documentation for `new`.
* pr:11220[] don't include lifetime arguments in `add_turbo_fish`.
* pr:11238[] shrink the span of errors from attribute macros and derives.
* pr:11187[] rename and use the 1.55 proc macro ABI for 1.54.


== Internal Improvements

* pr:11115[] refactor: avoid separate traversal in `Replace filter_map().next() with find_map()`.
* pr:11157[] remove `SemanticScope::speculative_resolve_as_mac`.
* pr:11189[] remove lossy `Definition::{from_token,from_node}` methods.
* pr:11216[] support registered tools and attributes in ide layer.
* pr:11225[], pr:11230[], pr:11237[] clean up doc and attribute handling.
* pr:11232[] filter out macro calls by file id in when building `DynMap`.
* pr:11235[] record attribute calls on assoc items in `TraitData` and `ImplData`.
* pr:11236[] avoid `InFile` wrapping of `DynMap` keys.