Skip to content

Commit

Permalink
Changelog #250
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Sep 9, 2024
1 parent 3712810 commit 890f757
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ struct S {

[discrete]
=== `extract_variable`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_variable.rs#L11[extract_variable.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_variable.rs#L12[extract_variable.rs]

Extracts subexpression into a variable.

Expand Down Expand Up @@ -1479,7 +1479,7 @@ impl Person {

[discrete]
=== `generate_delegate_trait`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_delegate_trait.rs#L28[generate_delegate_trait.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_delegate_trait.rs#L29[generate_delegate_trait.rs]

Generate delegate trait implementation for `StructField`s.

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

[discrete]
=== `introduce_named_generic`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/introduce_named_generic.rs#L8[introduce_named_generic.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/introduce_named_generic.rs#L9[introduce_named_generic.rs]

Replaces `impl Trait` function argument with the named generic.

Expand Down Expand Up @@ -3248,7 +3248,7 @@ fn handle(action: Action) {

[discrete]
=== `replace_is_some_with_if_let_some`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_is_method_with_if_let_method.rs#L8[replace_is_method_with_if_let_method.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_is_method_with_if_let_method.rs#L9[replace_is_method_with_if_let_method.rs]

Replace `if x.is_some()` with `if let Some(_tmp) = x` or `if x.is_ok()` with `if let Ok(_tmp) = x`.

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

[discrete]
=== `wrap_return_type_in_result`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/wrap_return_type_in_result.rs#L14[wrap_return_type_in_result.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/wrap_return_type_in_result.rs#L16[wrap_return_type_in_result.rs]

Wrap the function's return type into Result.

Expand Down
12 changes: 12 additions & 0 deletions generated_diagnostic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ This diagnostic is triggered if the `await` keyword is used outside of an async
This diagnostic is triggered if the `break` keyword is used outside of a loop.


=== cast-to-unsized
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/invalid_cast.rs#L106[invalid_cast.rs]

This diagnostic is triggered when casting to an unsized type


=== expected-function
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/expected_function.rs#L5[expected_function.rs]

Expand All @@ -36,6 +42,12 @@ This diagnostic is triggered if the targe type of an impl is from a foreign crat
This diagnostic is triggered if an item name doesn't follow https://doc.rust-lang.org/1.0.0/style/style/naming/README.html[Rust naming convention].


=== invalid-cast
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/invalid_cast.rs#L18[invalid_cast.rs]

This diagnostic is triggered if the code contains an illegal cast


=== invalid-derive-target
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/invalid_derive_target.rs#L3[invalid_derive_target.rs]

Expand Down
29 changes: 29 additions & 0 deletions thisweek/_posts/2024-09-09-changelog-250.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
= Changelog #250
:sectanchors:
:experimental:
:page-layout: post

Commit: commit:08c7bbc2dbe4dcc8968484f1a0e1e6fe7a1d4f6d[] +
Release: release:2024-09-09[] (`v0.3.2104`)

== New Features

* pr:17984[] implement cast typecheck and diagnostics.
* pr:18022[], pr:18053[] add IDE support for `asm!` expressions.

== Fixes

* pr:18031[] suggest name in pattern completion.
* pr:18016[] use existing type aliases in "Wrap return type in Result".
* pr:18028[] prevent lifetime hint panic in non-generic definitions.
* pr:18045[] keep loop blocks during lowering.
* pr:18068[] set `TraitRef` self types explicitly during lowering.
* pr:18067[] prevent MIR building when unknown types are present.
* pr:18059[] don't clobber discovered projects when updating settings.

== Internal Improvements

* pr:18026[] tweak completion scoring.
* pr:18044[] add edition-dependent keyword highlighting tests.
* pr:18065[] catch panics from diagnostics computation.
* pr:18066[] don't panic LSP writer thread when the receiver gets dropped.

0 comments on commit 890f757

Please sign in to comment.