Skip to content

Commit cf7e74d

Browse files
committed
Changelog #73
1 parent 62d261a commit cf7e74d

File tree

5 files changed

+44
-6
lines changed

5 files changed

+44
-6
lines changed

generated_assists.adoc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,37 @@ impl Default for Example {
637637
```
638638

639639

640+
[discrete]
641+
=== `generate_deref`
642+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_deref.rs#L15[generate_deref.rs]
643+
644+
Generate `Deref` impl using the given struct field.
645+
646+
.Before
647+
```rust
648+
struct A;
649+
struct B {
650+
┃a: A
651+
}
652+
```
653+
654+
.After
655+
```rust
656+
struct A;
657+
struct B {
658+
a: A
659+
}
660+
661+
impl std::ops::Deref for B {
662+
type Target = A;
663+
664+
fn deref(&self) -> &Self::Target {
665+
&self.a
666+
}
667+
}
668+
```
669+
670+
640671
[discrete]
641672
=== `generate_derive`
642673
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_derive.rs#L9[generate_derive.rs]

generated_config.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ List of features to activate.
3939
--
4040
Run build scripts (`build.rs`) for more precise code analysis.
4141
--
42+
[[rust-analyzer.cargo.useRustcWrapperForBuildScripts]]rust-analyzer.cargo.useRustcWrapperForBuildScripts (default: `true`)::
43+
+
44+
--
45+
Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
46+
avoid compiling unnecessary things.
47+
--
4248
[[rust-analyzer.cargo.noDefaultFeatures]]rust-analyzer.cargo.noDefaultFeatures (default: `false`)::
4349
+
4450
--

generated_diagnostic.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This diagnostic is triggered if the `break` keyword is used outside of a loop.
66

77

88
=== inactive-code
9-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L126[diagnostics.rs]
9+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L127[diagnostics.rs]
1010

1111
This diagnostic is shown for code with inactive `#[cfg]` attributes.
1212

@@ -18,7 +18,7 @@ This diagnostic is triggered if an item name doesn't follow https://doc.rust-lan
1818

1919

2020
=== macro-error
21-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L199[diagnostics.rs]
21+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L200[diagnostics.rs]
2222

2323
This diagnostic is shown for macro expansion errors.
2424

@@ -101,7 +101,7 @@ This diagnostic is triggered when `.filter_map(..).next()` is used, rather than
101101

102102

103103
=== unlinked-file
104-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unlinked_file.rs#L23[unlinked_file.rs]
104+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unlinked_file.rs#L24[unlinked_file.rs]
105105

106106
This diagnostic is shown for files that are not included in any crate, or files that are part of
107107
crates rust-analyzer failed to discover. The file will not have IDE features available.
@@ -133,7 +133,7 @@ This diagnostic is triggered if rust-analyzer is unable to discover referred mod
133133

134134

135135
=== unresolved-proc-macro
136-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L159[diagnostics.rs]
136+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L160[diagnostics.rs]
137137

138138
This diagnostic is shown when a procedural macro can not be found. This usually means that
139139
procedural macro support is simply disabled (and hence is only a weak hint instead of an error),

generated_features.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,14 @@ image::https://user-images.githubusercontent.com/48062697/113065576-04298180-91b
340340

341341

342342
=== On Enter
343-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/typing/on_enter.rs#L15[on_enter.rs]
343+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/typing/on_enter.rs#L16[on_enter.rs]
344344

345345
rust-analyzer can override kbd:[Enter] key to make it smarter:
346346

347347
- kbd:[Enter] inside triple-slash comments automatically inserts `///`
348348
- kbd:[Enter] in the middle or after a trailing space in `//` inserts `//`
349349
- kbd:[Enter] inside `//!` doc comments automatically inserts `//!`
350+
- kbd:[Enter] after `{` indents contents and closing `}` of single-line block
350351

351352
This action needs to be assigned to shortcut explicitly.
352353

manual.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ include::./generated_assists.adoc[]
541541
== Diagnostics
542542

543543
While most errors and warnings provided by rust-analyzer come from the `cargo check` integration, there's a growing number of diagnostics implemented using rust-analyzer's own analysis.
544-
These diagnostics don't respect `#[allow]` or `#[deny]` attributes yet, but can be turned off using the `rust-analyzer.diagnostics.enable`, `rust-analyzer.diagnostics.enableExperimental` or `rust-analyzer.diagnostics.disabled` settings.
544+
Some of these diagnostics don't respect `\#[allow]` or `\#[deny]` attributes yet, but can be turned off using the `rust-analyzer.diagnostics.enable`, `rust-analyzer.diagnostics.enableExperimental` or `rust-analyzer.diagnostics.disabled` settings.
545545

546546
include::./generated_diagnostic.adoc[]
547547

0 commit comments

Comments
 (0)