Skip to content

Commit ba03cd1

Browse files
committed
Changelog #248
1 parent d84fc67 commit ba03cd1

File tree

5 files changed

+61
-32
lines changed

5 files changed

+61
-32
lines changed

generated_assists.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ fn main() {
874874

875875
[discrete]
876876
=== `convert_while_to_loop`
877-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_while_to_loop.rs#L19[convert_while_to_loop.rs]
877+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_while_to_loop.rs#L20[convert_while_to_loop.rs]
878878

879879
Replace a while with a loop.
880880

@@ -1031,7 +1031,7 @@ fn qux(bar: Bar, baz: Baz) {}
10311031

10321032
[discrete]
10331033
=== `extract_expressions_from_format_string`
1034-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs#L18[extract_expressions_from_format_string.rs]
1034+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs#L14[extract_expressions_from_format_string.rs]
10351035

10361036
Move an expression out of a format string.
10371037

generated_config.adoc

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,14 @@ Automatically refresh project info via `cargo metadata` on
4545
--
4646
Run build scripts (`build.rs`) for more precise code analysis.
4747
--
48-
[[rust-analyzer.cargo.buildScripts.invocationLocation]]rust-analyzer.cargo.buildScripts.invocationLocation (default: `"workspace"`)::
49-
+
50-
--
51-
Specifies the working directory for running build scripts.
52-
- "workspace": run build scripts for a workspace in the workspace's root directory.
53-
This is incompatible with `#rust-analyzer.cargo.buildScripts.invocationStrategy#` set to `once`.
54-
- "root": run build scripts in the project's root directory.
55-
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
56-
is set.
57-
--
5848
[[rust-analyzer.cargo.buildScripts.invocationStrategy]]rust-analyzer.cargo.buildScripts.invocationStrategy (default: `"per_workspace"`)::
5949
+
6050
--
6151
Specifies the invocation strategy to use when running the build scripts command.
62-
If `per_workspace` is set, the command will be executed for each workspace.
63-
If `once` is set, the command will be executed once.
52+
If `per_workspace` is set, the command will be executed for each Rust workspace with the
53+
workspace as the working directory.
54+
If `once` is set, the command will be executed once with the opened project as the
55+
working directory.
6456
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
6557
is set.
6658
--
@@ -75,8 +67,7 @@ option.
7567
If there are multiple linked projects/workspaces, this command is invoked for
7668
each of them, with the working directory being the workspace root
7769
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
78-
by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and
79-
`#rust-analyzer.cargo.buildScripts.invocationLocation#`.
70+
by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#`.
8071

8172
By default, a cargo invocation will be constructed for the configured
8273
targets and features, with the following base command line:
@@ -209,16 +200,6 @@ List of `cargo check` (or other command specified in `check.command`) diagnostic
209200

210201
For example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`,...
211202
--
212-
[[rust-analyzer.check.invocationLocation]]rust-analyzer.check.invocationLocation (default: `"workspace"`)::
213-
+
214-
--
215-
Specifies the working directory for running checks.
216-
- "workspace": run checks for workspaces in the corresponding workspaces' root directories.
217-
This falls back to "root" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.
218-
- "root": run checks in the project's root directory.
219-
This config only has an effect when `#rust-analyzer.check.overrideCommand#`
220-
is set.
221-
--
222203
[[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"`)::
223204
+
224205
--
@@ -250,8 +231,7 @@ Cargo, you might also want to change
250231
If there are multiple linked projects/workspaces, this command is invoked for
251232
each of them, with the working directory being the workspace root
252233
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
253-
by changing `#rust-analyzer.check.invocationStrategy#` and
254-
`#rust-analyzer.check.invocationLocation#`.
234+
by changing `#rust-analyzer.check.invocationStrategy#`.
255235

256236
If `$saved_file` is part of the command, rust-analyzer will pass
257237
the absolute path of the saved file to the provided command. This is

generated_features.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ This is the same as `Go to Definition` with the following exceptions:
275275

276276

277277
=== Go to Definition
278-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L28[goto_definition.rs]
278+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L25[goto_definition.rs]
279279

280280
Navigates to the definition of an identifier.
281281

@@ -293,7 +293,7 @@ image::https://user-images.githubusercontent.com/48062697/113065563-025fbe00-91b
293293
=== Go to Implementation
294294
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_implementation.rs#L11[goto_implementation.rs]
295295

296-
Navigates to the impl blocks of types.
296+
Navigates to the impl items of types.
297297

298298
|===
299299
| Editor | Shortcut
@@ -576,7 +576,7 @@ image::https://user-images.githubusercontent.com/48062697/113171066-105c2000-923
576576

577577

578578
=== Open Docs
579-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L121[doc_links.rs]
579+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L118[doc_links.rs]
580580

581581
Retrieve a links to documentation for the given symbol.
582582

@@ -649,7 +649,7 @@ image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b
649649

650650

651651
=== Semantic Syntax Highlighting
652-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L66[syntax_highlighting.rs]
652+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L68[syntax_highlighting.rs]
653653

654654
rust-analyzer highlights the code semantically.
655655
For example, `Bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait.

manual.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,12 @@ interface JsonProject {
705705
/// several different "sysroots" in one graph of
706706
/// crates.
707707
sysroot_src?: string;
708+
/// List of groups of common cfg values, to allow
709+
/// sharing them between crates.
710+
///
711+
/// Maps from group name to its cfgs. Cfg follow
712+
/// the same format as `Crate.cfg`.
713+
cfg_groups?: { [key: string]: string[]; };
708714
/// The set of crates comprising the current
709715
/// project. Must include all transitive
710716
/// dependencies as well as sysroot crate (libstd,
@@ -754,6 +760,12 @@ interface Crate {
754760
include_dirs: string[],
755761
exclude_dirs: string[],
756762
},
763+
/// List of cfg groups this crate inherits.
764+
///
765+
/// All cfg in these groups will be concatenated to
766+
/// `cfg`. It is impossible to replace a value from
767+
/// the groups.
768+
cfg_groups?: string[];
757769
/// The set of cfgs activated for a given crate, like
758770
/// `["unix", "feature=\"foo\"", "feature=\"bar\""]`.
759771
cfg: string[];
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
= Changelog #248
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:7106cd3be50b2a43c1d9f2787bf22d4369c2b25b[] +
7+
Release: release:2024-08-26[] (`v0.3.2086`)
8+
9+
== New Features
10+
11+
* pr:17936[] implement `module_path!`.
12+
* pr:17857[] allow declaring `cfg` groups in `rust-project.json`.
13+
* pr:17927[], pr:17955[] speed up search for short associated functions.
14+
15+
== Fixes
16+
17+
* pr:17942[] implement floating point casts in const eval.
18+
* pr:17958[] Consider `Deref` impls in trait method completions.
19+
* pr:17960[] use `extra_test_bin_args` in Test Explorer runner.
20+
* pr:17925[] include generics when lowering `extern type`.
21+
* pr:17928[] keep comments in "Convert `while` to `loop`".
22+
* pr:17924[] fix panic when a TAIT exists in a RPIT.
23+
* pr:17932[] fix semantic highlighting panics during start-up.
24+
* pr:17939[], pr:17948[] improve handling of `Sized` predicates.
25+
* pr:17943[] improve proc macro panic message and workspace loading failure diagnostic.
26+
* pr:17912[], pr:17946[] run flycheck without reverse dependencies when target is specified.
27+
* pr:17949[] watch build files from `rust-project.json`.
28+
* pr:17956[] keep original error when retrying `cargo metadata` with `--no-deps`.
29+
* pr:17913[] add workspace-level config to `rust-analyzer.toml`.
30+
31+
== Internal Improvements
32+
33+
* pr:17888[] remove `invocationLocation` in favor of `invocationStrategy`.
34+
* pr:17886[] wait for cache priming before reporting that the server is ready.
35+
* pr:17898[] improve macro token mapping heuristics.
36+
* pr:17961[] don't allocate autoderef steps when not needed.
37+
* pr:17930[] remove the ability to configure the user config path.

0 commit comments

Comments
 (0)