diff --git a/generated_assists.adoc b/generated_assists.adoc index 0ee17acf..92f4b17a 100644 --- a/generated_assists.adoc +++ b/generated_assists.adoc @@ -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] @@ -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. diff --git a/generated_features.adoc b/generated_features.adoc index 57ec0de8..a724616a 100644 --- a/generated_features.adoc +++ b/generated_features.adoc @@ -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] diff --git a/thisweek/_posts/2021-12-13-changelog-107.adoc b/thisweek/_posts/2021-12-13-changelog-107.adoc new file mode 100644 index 00000000..6ee34d4b --- /dev/null +++ b/thisweek/_posts/2021-12-13-changelog-107.adoc @@ -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.