Skip to content

Commit 3de1a09

Browse files
ytmimicalebcartwright
authored andcommitted
Set package.metadata.rust-analyzer.rustc_private=true in Cargo.toml
By setting this value in the Cargo.toml rust-analyzer understands that rustfmt uses compiler-internals using `extern crate`. This is a universal step that all developers will need to take in order to get better type hints and code completion suggestions for compiler-internals in their editor. **Note**: users will also need to install the `rustc-dev` component via `rustup` and add the following to their rust-analyzer configuration: ```json { "rust-analyzer.rustcSource": "discover", "rust-analyzer.updates.channel": "nightly" } ```
1 parent 33c6074 commit 3de1a09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,7 @@ rustfmt-config_proc_macro = { version = "0.2", path = "config_proc_macro" }
6565
rustc-workspace-hack = "1.0.0"
6666

6767
# Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
68+
69+
[package.metadata.rust-analyzer]
70+
# This package uses #[feature(rustc_private)]
71+
rustc_private = true

0 commit comments

Comments
 (0)