Skip to content

Changelog #107 #169

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
Dec 13, 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
36 changes: 35 additions & 1 deletion generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,40 @@ struct Point {
```


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

Adds a documentation template above a function definition / declaration.

.Before
```rust
pub fn my_┃func(a: i32, b: i32) -> Result<(), std::io::Error> {
unimplemented!()
}
```

.After
```rust
/// .
///
/// # Examples
///
/// ```
/// use test::my_func;
///
/// assert_eq!(my_func(a, b), );
/// ```
///
/// # Errors
///
/// This function will return an error if .
pub fn my_func(a: i32, b: i32) -> Result<(), std::io::Error> {
unimplemented!()
}
```


[discrete]
=== `generate_enum_as_method`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_projection_method.rs#L55[generate_enum_projection_method.rs]
Expand Down Expand Up @@ -2345,7 +2379,7 @@ fn arithmetics {

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

Extracts single use item from use list.

Expand Down
12 changes: 12 additions & 0 deletions generated_features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,18 @@ rust-analyzer itself.
image::https://user-images.githubusercontent.com/48062697/113065586-068bdb80-91b1-11eb-9507-fee67f9f45a0.gif[]


=== Shuffle Crate Graph
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/shuffle_crate_graph.rs#L8[shuffle_crate_graph.rs]

Randomizes all crate IDs in the crate graph, for debugging.

|===
| Editor | Action Name

| VS Code | **Rust Analyzer: Shuffle Crate Graph**
|===


=== Status
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/status.rs#L25[status.rs]

Expand Down
40 changes: 40 additions & 0 deletions thisweek/_posts/2021-12-13-changelog-107.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
= Changelog #107
:sectanchors:
:page-layout: post

Commit: commit:db2a7087b994e20f264f26ad6db75184282ad120[] +
Release: release:2021-12-13[]

== Sponsors

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

== New Features

* pr:10951[] (first contribution) add assist to generate documentation templates:
+
image::https://user-images.githubusercontent.com/308347/145762247-8f6f3f01-2eec-494d-a18d-3c4d163118a1.gif[]
* pr:10877[] make syntax hightlighting linear.

== Fixes

* pr:10979[] don't show trait flyimports for impl trait and placeholders.
* pr:10976[] show case-insensitive exact matches instead of fuzzy flyimport for short paths.
* pr:10986[] fix lint completions not working for unclosed attributes.
* pr:10960[] fix handling of macros in `extern` blocks.
* pr:10957[] fix some `TryToNav` impls not upmapping ranges out of macros.
* pr:10966[] fix library target overriding sysroot deps.
* pr:10977[] fix `concat!` with captured expression.
* pr:10987[] respect inner attributes for ``Struct``s and ``Enum``s.
* pr:10988[] fix expected type calculation in struct literal followed by comma.

== Internal Improvements

* pr:10995[] switch from trait-based `TokenSource` to simple struct of arrays.
* pr:10978[] only prime direct dependencies of the workspace crates.
* pr:10958[] add `Shuffle Crate Graph` command.
* pr:10950[] split out more ``PathKind``s from ``ImmediateLocation``.
* pr:10975[] shrink ``TraitImpl``s and ``InherentImpl``s hashmaps.
* pr:10981[] remove some allocations.
* pr:10949[] bump parser step limit.