Skip to content

Commit 8fa475a

Browse files
committed
Changelog #167
1 parent b432b05 commit 8fa475a

File tree

4 files changed

+88
-3
lines changed

4 files changed

+88
-3
lines changed

generated_assists.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ impl From<u32> for A {
14021402

14031403
[discrete]
14041404
=== `generate_function`
1405-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_function.rs#L24[generate_function.rs]
1405+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_function.rs#L26[generate_function.rs]
14061406

14071407
Adds a stub function with a signature matching the function under the cursor.
14081408

manual.adoc

+51-1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,27 @@ The `rust-analyzer` binary can be installed via https://brew.sh/[Homebrew].
232232
$ brew install rust-analyzer
233233
----
234234

235+
=== VS Code or VSCodium in Flatpak
236+
237+
Setting up `rust-analyzer` with a Flatpak version of Code is not trivial because of the Flatpak sandbox.
238+
While the sandbox can be disabled for some directories, `/usr/bin` will always be mounted under `/run/host/usr/bin`.
239+
This prevents access to the system's C compiler, a system-wide installation of Rust, or any other libraries you might want to link to.
240+
Some compilers and libraries can be acquired as Flatpak SDKs, such as `org.freedesktop.Sdk.Extension.rust-stable` or `org.freedesktop.Sdk.Extension.llvm15`.
241+
242+
If you use a Flatpak SDK for Rust, there should be no extra steps necessary.
243+
244+
If you want to use Flatpak in combination with `rustup`, the following steps might help:
245+
246+
- both Rust and `rustup` have to be installed using https://rustup.rs. Distro packages _will not_ work.
247+
- you need to launch Code, open a terminal and run `echo $PATH`
248+
- using https://flathub.org/apps/details/com.github.tchx84.Flatseal[Flatseal], you must add an environment variable called `PATH`.
249+
Set its value to the output from above, appending `:~/.cargo/bin`, where `~` is the path to your home directory.
250+
You must replace `~`, as it won't be expanded otherwise.
251+
- while Flatseal is open, you must enable access to "All user files"
252+
253+
A C compiler should already be available via `org.freedesktop.Sdk`.
254+
Any other tools or libraries you will need to acquire from Flatpak.
255+
235256
=== Emacs
236257

237258
Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
@@ -520,13 +541,42 @@ There is a package named `ra_ap_rust_analyzer` available on https://crates.io/cr
520541

521542
For more details, see https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/publish.yml[the publish workflow].
522543

523-
=== Visual Studio IDE
544+
=== Visual Studio 2022
545+
546+
There are multiple rust-analyzer extensions for Visual Studio 2022 on Windows:
547+
548+
==== rust-analyzer.vs
549+
550+
(License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International)
551+
552+
https://marketplace.visualstudio.com/items?itemName=kitamstudios.RustAnalyzer[Visual Studio Marketplace]
553+
554+
https://github.com/kitamstudios/rust-analyzer/[GitHub]
524555

525556
Support for Rust development in the Visual Studio IDE is enabled by the link:https://marketplace.visualstudio.com/items?itemName=kitamstudios.RustAnalyzer[rust-analyzer] package. Either click on the download link or install from IDE's extension manager.
526557
For now link:https://visualstudio.microsoft.com/downloads/[Visual Studio 2022] is required. All editions are supported viz. Community, Professional & Enterprise.
527558
The package aims to provide 0-friction installation and therefore comes loaded with most things required including rust-analyzer binary. If anything it needs is missing, appropriate errors / warnings will guide the user. E.g. cargo.exe needs to be in path and the package will tell you as much.
528559
This package is under rapid active development. So if you encounter any issues please file it at link:https://github.com/kitamstudios/rust-analyzer/[rust-analyzer.vs].
529560

561+
==== VS_RustAnalyzer
562+
563+
(License: GPL)
564+
565+
https://marketplace.visualstudio.com/items?itemName=cchharris.vsrustanalyzer[Visual Studio Marketplace]
566+
567+
https://github.com/cchharris/VS-RustAnalyzer[GitHub]
568+
569+
==== SourceGear Rust
570+
571+
(License: closed source)
572+
573+
https://marketplace.visualstudio.com/items?itemName=SourceGear.SourceGearRust[Visual Studio Marketplace]
574+
575+
https://github.com/sourcegear/rust-vs-extension[GitHub (docs, issues, discussions)]
576+
577+
* Free (no-cost)
578+
* Supports all editions of Visual Studio 2022 on Windows: Community, Professional, or Enterprise
579+
530580
== Troubleshooting
531581

532582
Start with looking at the rust-analyzer version.

thisweek/_posts/2023-01-30-changelog-166.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ image::https://user-images.githubusercontent.com/3757771/214038673-658f3b43-5310
2727
* pr:14011[] fix `Unwrap block` for `let` statements.
2828
* pr:14037[] handle boolean scrutinees better in `Match to if-let` assist.
2929
* pr:14039[] make `Add missing impl members` work for impls inside blocks.
30-
* pr:14038[] don't fail workspace loading if sysroot can't be found
30+
* pr:14038[] don't fail workspace loading if sysroot can't be found.
3131

3232
== Internal Improvements
3333

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
= Changelog #167
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:0b32b65ca6aee21f352d178eeb0b85e092a93177[] +
7+
Release: release:2023-02-06[] (`0.3.1394`)
8+
9+
== New Features
10+
11+
* pr:14065[] support generic functions in the `generate_function` assist.
12+
* pr:14057[] handle complex patterns in `match` to `let-else` assist.
13+
* pr:14063[] drop support for the 1.58 proc-macro ABI.
14+
15+
== Fixes
16+
17+
* pr:14036[] record method resolution for the remaining operator expressions.
18+
* pr:14067[] Code: create the trace output channel lazily.
19+
* pr:14068[] apply `unsize` adjustments after pointer casts.
20+
* pr:14071[] don't render field-less discriminant inlay hints for data-carrying enums.
21+
* pr:14082[] support non-ASCII characters in case conversion.
22+
* pr:14043[] use relative offsets when inserting ident token in macro expansion for completion.
23+
* pr:14058[] fix display of negative trait bounds in outline view.
24+
25+
== Internal Improvements
26+
27+
* pr:14010[] (first contribution) make the fuzzing harness build again.
28+
* pr:14072[] (first contribution) mention all three Visual Studio extensions in the manual.
29+
* pr:14049[] add installation instructions for Flatpak VS Code.
30+
* pr:14070[] implement proc-macro API versioning.
31+
* pr:14061[] make `tt` generic over the span data.
32+
* pr:14056[] parse `#[allow_internal_unsafe]` on macros.
33+
* pr:14062[] set the current edition to 2021.
34+
* pr:14034[] tweak change collapsing some more.
35+
* pr:14083[] add more basic issue templates.

0 commit comments

Comments
 (0)