Skip to content

Commit b5639d3

Browse files
committed
Add rust-analyzer proxy.
1 parent a7809fe commit b5639d3

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

doc/src/concepts/components.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ toolchains. The following is an overview of the different components:
4040
* `rust-docs` — This is a local copy of the [Rust documentation]. Use the
4141
`rustup doc` command to open the documentation in a web browser. Run `rustup
4242
doc --help` for more options.
43-
* `rls` — [RLS] is a language server that provides support for editors and
44-
IDEs.
43+
* `rust-analyzer`[rust-analyzer] is a language server that provides support
44+
for editors and IDEs.
45+
* `rls`[RLS] is a language server that is deprecated and has been replaced
46+
by rust-analyzer.
4547
* `clippy` — [Clippy] is a lint tool that provides extra checks for common
4648
mistakes and stylistic choices.
4749
* `miri` — [Miri] is an experimental Rust interpreter, which can be used for
@@ -76,6 +78,7 @@ details.
7678
[build-std]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std
7779
[miri]: https://github.com/rust-lang/miri/
7880
[RLS]: https://github.com/rust-lang/rls
81+
[rust-analyzer]: https://rust-analyzer.github.io/
7982
[rustdoc]: https://doc.rust-lang.org/rustdoc/
8083
[cargo]: https://doc.rust-lang.org/cargo/
8184
[clippy]: https://github.com/rust-lang/rust-clippy

doc/src/concepts/profiles.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ available at this time are `minimal`, `default`, and `complete`:
1616
`rustup`. This should never be used, as it includes *every* component ever
1717
included in the metadata and thus will almost always fail. If you are
1818
looking for a way to install devtools such as `miri` or IDE integration
19-
tools (`rls`), you should use the `default` profile and
19+
tools (`rust-analyzer`), you should use the `default` profile and
2020
install the needed additional components manually, either by using `rustup
2121
component add` or by using `-c` when installing the toolchain.
2222

doc/src/concepts/proxies.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ The list of proxies is currently static in `rustup` and is as follows:
1616

1717
- `rust-lldb`, `rust-gdb`, and `rust-gdbgui` are simple wrappers around the `lldb`, `gdb`, and `gdbgui` debuggers respectively. The wrappers enable some pretty-printing of Rust values and add some convenience features to the debuggers by means of their scripting interfaces.
1818

19-
- `rls` is part of the Rust IDE integration tooling. It implements the language-server protocol to permit IDEs and editors such as Visual Studio Code, ViM, or Emacs, access to the semantics of the Rust code you are editing. It comes from the `rls` component.
19+
- `rust-analyzer` is part of the Rust IDE integration tooling. It implements the language-server protocol to permit IDEs and editors such as Visual Studio Code, ViM, or Emacs, access to the semantics of the Rust code you are editing. It comes from the `rust-analyzer` component.
2020

2121
- `cargo-clippy` and `clippy-driver` are related to the `clippy` linting tool which provides extra checks for common mistakes and stylistic choices and it comes from the `clippy` component.
2222

2323
- `cargo-miri` is an experimental interpreter for Rust's mid-level intermediate representation (MIR) and it comes from the `miri` component.
24+
25+
- `rls` is a deprecated IDE tool that has been replaced by `rust-analyzer`. It comes from the `rls` component.

src/lib.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub static TOOLS: &[&str] = &[
2727
"rust-gdb",
2828
"rust-gdbgui",
2929
"rls",
30+
"rust-analyzer",
3031
"cargo-clippy",
3132
"clippy-driver",
3233
"cargo-miri",
@@ -110,12 +111,12 @@ mod tests {
110111
for tool in DUP_TOOLS {
111112
assert!(is_proxyable_tools(tool).is_ok());
112113
}
113-
let message = &"unknown proxy name: 'unknown-tool'; valid proxy names are 'rustc', \
114-
'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rust-gdbgui', 'rls', 'cargo-clippy', \
115-
'clippy-driver', 'cargo-miri', 'rustfmt', 'cargo-fmt'";
116-
assert!(is_proxyable_tools("unknown-tool")
117-
.unwrap_err()
118-
.to_string()
119-
.eq(message));
114+
let message = "unknown proxy name: 'unknown-tool'; valid proxy names are 'rustc', \
115+
'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rust-gdbgui', 'rls', 'rust-analyzer', \
116+
'cargo-clippy', 'clippy-driver', 'cargo-miri', 'rustfmt', 'cargo-fmt'";
117+
assert_eq!(
118+
is_proxyable_tools("unknown-tool").unwrap_err().to_string(),
119+
message
120+
);
120121
}
121122
}

tests/cli-misc.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,10 @@ fn rustup_failed_path_search() {
411411
expect_err(
412412
config,
413413
broken,
414-
"unknown proxy name: 'fake_proxy'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rust-gdbgui', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri', 'rustfmt', 'cargo-fmt'",
414+
"unknown proxy name: 'fake_proxy'; valid proxy names are \
415+
'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rust-gdbgui', \
416+
'rls', 'rust-analyzer', 'cargo-clippy', 'clippy-driver', 'cargo-miri', \
417+
'rustfmt', 'cargo-fmt'",
415418
);
416419

417420
// Hardlink will be automatically cleaned up by test setup code

0 commit comments

Comments
 (0)