Skip to content

Commit 2741784

Browse files
committed
Changelog #185
1 parent 42b5577 commit 2741784

File tree

4 files changed

+87
-5
lines changed

4 files changed

+87
-5
lines changed

generated_assists.adoc

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn main() {
7373

7474
[discrete]
7575
=== `add_impl_default_members`
76-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/add_missing_impl_members.rs#L55[add_missing_impl_members.rs]
76+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/add_missing_impl_members.rs#L51[add_missing_impl_members.rs]
7777

7878
Adds scaffold for overriding default impl members.
7979

@@ -110,7 +110,7 @@ impl Trait for () {
110110

111111
[discrete]
112112
=== `add_impl_missing_members`
113-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/add_missing_impl_members.rs#L14[add_missing_impl_members.rs]
113+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/add_missing_impl_members.rs#L10[add_missing_impl_members.rs]
114114

115115
Adds scaffold for required impl members.
116116

@@ -924,7 +924,7 @@ enum A { One(One) }
924924

925925
[discrete]
926926
=== `extract_type_alias`
927-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_type_alias.rs#L7[extract_type_alias.rs]
927+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_type_alias.rs#L10[extract_type_alias.rs]
928928

929929
Extracts the selected type as a type alias.
930930

@@ -1707,6 +1707,31 @@ fn foo(name: Option<&str>) {
17071707
```
17081708

17091709

1710+
[discrete]
1711+
=== `inline_const_as_literal`
1712+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/inline_const_as_literal.rs#L5[inline_const_as_literal.rs]
1713+
1714+
Evaluate and inline const variable as literal.
1715+
1716+
.Before
1717+
```rust
1718+
const STRING: &str = "Hello, World!";
1719+
1720+
fn something() -> &'static str {
1721+
STRING┃
1722+
}
1723+
```
1724+
1725+
.After
1726+
```rust
1727+
const STRING: &str = "Hello, World!";
1728+
1729+
fn something() -> &'static str {
1730+
"Hello, World!"
1731+
}
1732+
```
1733+
1734+
17101735
[discrete]
17111736
=== `inline_into_callers`
17121737
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/inline_call.rs#L27[inline_call.rs]
@@ -2612,7 +2637,7 @@ fn main() {
26122637

26132638
[discrete]
26142639
=== `replace_derive_with_manual_impl`
2615-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs#L21[replace_derive_with_manual_impl.rs]
2640+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs#L18[replace_derive_with_manual_impl.rs]
26162641

26172642
Converts a `derive` impl into a manual one.
26182643

generated_features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ image::https://user-images.githubusercontent.com/48062697/113065573-04298180-91b
463463

464464

465465
=== Memory Usage
466-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-db/src/apply_change.rs#L40[apply_change.rs]
466+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-db/src/apply_change.rs#L43[apply_change.rs]
467467

468468
Clears rust-analyzer's internal database and prints memory usage statistics.
469469

manual.adoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,28 @@ However, if you use some other build system, you'll have to describe the structu
653653
[source,TypeScript]
654654
----
655655
interface JsonProject {
656+
/// Path to the sysroot directory.
657+
///
658+
/// The sysroot is where rustc looks for the
659+
/// crates that are built-in to rust, such as
660+
/// std.
661+
///
662+
/// https://doc.rust-lang.org/rustc/command-line-arguments.html#--sysroot-override-the-system-root
663+
///
664+
/// To see the current value of sysroot, you
665+
/// can query rustc:
666+
///
667+
/// ```
668+
/// $ rustc --print sysroot
669+
/// /Users/yourname/.rustup/toolchains/stable-x86_64-apple-darwin
670+
/// ```
671+
sysroot?: string;
656672
/// Path to the directory with *source code* of
657673
/// sysroot crates.
658674
///
675+
/// By default, this is `lib/rustlib/src/rust/library`
676+
/// relative to the sysroot.
677+
///
659678
/// It should point to the directory where std,
660679
/// core, and friends can be found:
661680
///
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
= Changelog #185
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:a4407b45ee9087486acd818e1b6ccddc585cc924[] +
7+
Release: release:2023-06-12[] (`v0.3.1549`)
8+
9+
== New Features
10+
11+
* pr:14925[] (first contribution) add "Inline constant as literal" assist.
12+
* pr:15028[] give `rustfmt` jobs a separate thread.
13+
14+
== Fixes
15+
16+
* pr:14960[] (first contribution) add span to token groups.
17+
* pr:14974[] (first contribution) properly format documentation for ``SignatureHelpRequest``s.
18+
* pr:14978[] emit `'_` for lifetime generics in `HirDisplay`.
19+
* pr:15000[] only generate derived trait bound for associated types in field types.
20+
* pr:15006[] fix panic in `format_args!` expansion.
21+
* pr:15012[] infer async return type in `generate_function`.
22+
* pr:14875[] handle lifetimes in assists.
23+
* pr:14989[], pr:15025[] derive source scope from syntax node to be transformed.
24+
* pr:15019[] fix panic in displaying const trait objects.
25+
* pr:15022[] fix panic in displaying unsized structs.
26+
* pr:14998[] make eager macros lazier.
27+
28+
== Internal Improvements
29+
30+
* pr:15005[] (first contribution) fix typo in `reload.rs`.
31+
* pr:14980[], pr:14988[] sync from downstream.
32+
* pr:14984[], pr:14997[] bring back the `sysroot-abi` feature.
33+
* pr:14979[] migrate some assists to use the structured snippet API.
34+
* pr:15014[] document the `sysroot` field in `JsonProject`.
35+
* pr:15020[] show query entry counts in memory usage command.
36+
* pr:14827[] offset version number when auto-publishing.
37+
* pr:14994[] fix CI to actually run when proc-macro things change.
38+
* pr:14995[] fix proc-macro slow test.

0 commit comments

Comments
 (0)