Skip to content

Changelog #74 #105

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

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ fn main() {

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

Adds missing clauses to a `match` expression.

Expand Down Expand Up @@ -1058,7 +1058,7 @@ fn main() {

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

Inlines local variable.

Expand All @@ -1080,7 +1080,7 @@ fn main() {

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

Change an anonymous lifetime to a named lifetime.

Expand Down Expand Up @@ -1529,7 +1529,7 @@ impl Foo for Bar {

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

Converts a `derive` impl into a manual one.

Expand Down
2 changes: 1 addition & 1 deletion generated_features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917


=== Expand Macro Recursively
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/expand_macro.rs#L19[expand_macro.rs]
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/expand_macro.rs#L17[expand_macro.rs]

Shows the full macro expansion of the macro at current cursor.

Expand Down
74 changes: 48 additions & 26 deletions manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -429,70 +429,92 @@ However, if you use some other build system, you'll have to describe the structu
[source,TypeScript]
----
interface JsonProject {
/// Path to the directory with *source code* of sysroot crates.
/// Path to the directory with *source code* of
/// sysroot crates.
///
/// It should point to the directory where std,
/// core, and friends can be found:
///
/// It should point to the directory where std, core, and friends can be found:
/// https://github.com/rust-lang/rust/tree/master/library.
///
/// If provided, rust-analyzer automatically adds dependencies on sysroot
/// crates. Conversely, if you omit this path, you can specify sysroot
/// dependencies yourself and, for example, have several different "sysroots" in
/// one graph of crates.
/// If provided, rust-analyzer automatically adds
/// dependencies on sysroot crates. Conversely,
/// if you omit this path, you can specify sysroot
/// dependencies yourself and, for example, have
/// several different "sysroots" in one graph of
/// crates.
sysroot_src?: string;
/// The set of crates comprising the current project.
/// Must include all transitive dependencies as well as sysroot crate (libstd, libcore and such).
/// The set of crates comprising the current
/// project. Must include all transitive
/// dependencies as well as sysroot crate (libstd,
/// libcore and such).
crates: Crate[];
}

interface Crate {
/// Optional crate name used for display purposes, without affecting semantics.
/// See the `deps` key for semantically-significant crate names.
/// Optional crate name used for display purposes,
/// without affecting semantics. See the `deps`
/// key for semantically-significant crate names.
display_name?: string;
/// Path to the root module of the crate.
root_module: string;
/// Edition of the crate.
edition: "2015" | "2018" | "2021";
/// Dependencies
deps: Dep[];
/// Should this crate be treated as a member of current "workspace".
/// Should this crate be treated as a member of
/// current "workspace".
///
/// By default, inferred from the `root_module` (members are the crates which reside
/// inside the directory opened in the editor).
/// By default, inferred from the `root_module`
/// (members are the crates which reside inside
/// the directory opened in the editor).
///
/// Set this to `false` for things like standard library and 3rd party crates to
/// enable performance optimizations (rust-analyzer assumes that non-member crates
/// don't change).
/// Set this to `false` for things like standard
/// library and 3rd party crates to enable
/// performance optimizations (rust-analyzer
/// assumes that non-member crates don't change).
is_workspace_member?: boolean;
/// Optionally specify the (super)set of `.rs` files comprising this crate.
/// Optionally specify the (super)set of `.rs`
/// files comprising this crate.
///
/// By default, rust-analyzer assumes that only files under `root_module.parent` can belong to a crate.
/// `include_dirs` are included recursively, unless a subdirectory is in `exclude_dirs`.
/// By default, rust-analyzer assumes that only
/// files under `root_module.parent` can belong
/// to a crate. `include_dirs` are included
/// recursively, unless a subdirectory is in
/// `exclude_dirs`.
///
/// Different crates can share the same `source`.
///
/// If two crates share an `.rs` file in common, they *must* have the same `source`.
/// rust-analyzer assumes that files from one source can't refer to files in another source.
/// If two crates share an `.rs` file in common,
/// they *must* have the same `source`.
/// rust-analyzer assumes that files from one
/// source can't refer to files in another source.
source?: {
include_dirs: string[],
exclude_dirs: string[],
},
/// The set of cfgs activated for a given crate, like `["unix", "feature=\"foo\"", "feature=\"bar\""]`.
/// The set of cfgs activated for a given crate, like
/// `["unix", "feature=\"foo\"", "feature=\"bar\""]`.
cfg: string[];
/// Target triple for this Crate.
///
/// Used when running `rustc --print cfg` to get target-specific cfgs.
/// Used when running `rustc --print cfg`
/// to get target-specific cfgs.
target?: string;
/// Environment variables, used for the `env!` macro
/// Environment variables, used for
/// the `env!` macro
env: : { [key: string]: string; },

/// For proc-macro crates, path to compiles proc-macro (.so file).
/// For proc-macro crates, path to compiled
/// proc-macro (.so file).
proc_macro_dylib_path?: string;
}

interface Dep {
/// Index of a crate in the `crates` array.
crate: number,
/// Name as should appear in the (implicit) `extern crate name` declaration.
/// Name as should appear in the (implicit)
/// `extern crate name` declaration.
name: string,
}
----
Expand Down
45 changes: 45 additions & 0 deletions thisweek/_posts/2021-04-20-changelog-74.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
= Changelog #74
:sectanchors:
:page-layout: post

Commit: commit:d906b7ad889209bd09a6cc3af752fea06e4d953d[] +
Release: release:2021-04-20[]

== Sponsors

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

== Announcement

This is an out-of-band release that fixes a recent regression which caused project loading hangs.
It should also include the recent "Implement `Deref` assist" which didn't make the cut for the last release.

== New Features

* pr:8462[] expand macros in type positions.

== Fixes

* pr:8600[] fix project loading hang.
* pr:8524[] fix "Extract function" assist with partial block selection.
* pr:8565[] "Fill match arms" assist: add remaining arms for enum tuples.
* pr:8574[] check for rust doc code attributes like rustdoc does.
* pr:8540[] prevent renaming items that are not part of the workspace (LSP extension).
* pr:8578[] fix inner attributes false positives in docs.
* pr:8582[] (first contribution) fix typo in `comparison` semantic token type.
* pr:8601[] trigger "Inline variable" assist on variable uses.
* pr:8467[] actually add "Implement `Deref`" assist (it was included in last changelog by mistake).
* pr:8577[] support crates/module roots in `external_docs`.
* pr:8587[] fix some `find_path` bugs around inner items (fixes auto-imports with macro calls).
* pr:8602[] fix panic in "Replace derive with manual implementation".

== Internal Improvements

* pr:8502[] document review requesting etiquette.
* pr:8527[] rewrite "Introduce named lifetime" assist to use mutable syntax trees.
* pr:8584[] fix slightly broken test.
* pr:8588[] add guidelines for release notes PR descriptions.
* pr:8579[] fix "Server status" capability name in docs.
* pr:8580[] remove confusion around `serverStatusNotification`.
* pr:8586[] replace `SyntaxRewriter` usage with `ted` in `eager::eager_macro_recur`.