mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
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" } ```
This commit is contained in:
parent
33c60740d3
commit
3de1a095e0
@ -65,3 +65,7 @@ rustfmt-config_proc_macro = { version = "0.2", path = "config_proc_macro" }
|
||||
rustc-workspace-hack = "1.0.0"
|
||||
|
||||
# Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
|
||||
|
||||
[package.metadata.rust-analyzer]
|
||||
# This package uses #[feature(rustc_private)]
|
||||
rustc_private = true
|
||||
|
Loading…
Reference in New Issue
Block a user