mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
3de1a095e0
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" } ```
72 lines
1.6 KiB
TOML
72 lines
1.6 KiB
TOML
[package]
|
|
|
|
name = "rustfmt-nightly"
|
|
version = "1.5.0"
|
|
description = "Tool to find and fix Rust formatting issues"
|
|
repository = "https://github.com/rust-lang/rustfmt"
|
|
readme = "README.md"
|
|
license = "Apache-2.0/MIT"
|
|
build = "build.rs"
|
|
categories = ["development-tools"]
|
|
edition = "2021"
|
|
|
|
[[bin]]
|
|
name = "rustfmt"
|
|
path = "src/bin/main.rs"
|
|
|
|
[[bin]]
|
|
name = "cargo-fmt"
|
|
path = "src/cargo-fmt/main.rs"
|
|
|
|
[[bin]]
|
|
name = "rustfmt-format-diff"
|
|
path = "src/format-diff/main.rs"
|
|
|
|
[[bin]]
|
|
name = "git-rustfmt"
|
|
path = "src/git-rustfmt/main.rs"
|
|
|
|
[features]
|
|
default = ["cargo-fmt", "rustfmt-format-diff"]
|
|
cargo-fmt = []
|
|
rustfmt-format-diff = []
|
|
generic-simd = ["bytecount/generic-simd"]
|
|
|
|
[dependencies]
|
|
annotate-snippets = { version = "0.9", features = ["color"] }
|
|
anyhow = "1.0"
|
|
bytecount = "0.6"
|
|
cargo_metadata = "0.14"
|
|
clap = { version = "3.1", features = ["derive"] }
|
|
derive-new = "0.5"
|
|
diff = "0.1"
|
|
dirs = "4.0"
|
|
env_logger = "0.9"
|
|
getopts = "0.2"
|
|
ignore = "0.4"
|
|
itertools = "0.10"
|
|
lazy_static = "1.4"
|
|
log = "0.4"
|
|
regex = "1.5"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
term = "0.7"
|
|
thiserror = "1.0"
|
|
toml = "0.5"
|
|
unicode-segmentation = "1.9"
|
|
unicode-width = "0.1"
|
|
unicode_categories = "0.1"
|
|
|
|
rustfmt-config_proc_macro = { version = "0.2", path = "config_proc_macro" }
|
|
|
|
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
|
|
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
|
|
# for more information.
|
|
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
|