Skip to content

Commit

Permalink
Auto merge of rust-lang#119542 - lnicola:sync-from-ra2, r=lnicola
Browse files Browse the repository at this point in the history
Subtree update of `rust-analyzer`

r? ghost
  • Loading branch information
bors committed Jan 4, 2024
2 parents 139fb22 + b91d1c0 commit 090d5ea
Show file tree
Hide file tree
Showing 241 changed files with 6,915 additions and 3,074 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ pub struct RustAnalyzer {
}

impl RustAnalyzer {
pub const ALLOW_FEATURES: &'static str = "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink";
pub const ALLOW_FEATURES: &'static str = "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink,proc_macro_def_site";
}

impl Step for RustAnalyzer {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xtask = "run --package xtask --bin xtask --"
tq = "test -- -q"
qt = "tq"
lint = "clippy --all-targets -- -Aclippy::collapsible_if -Aclippy::needless_pass_by_value -Aclippy::nonminimal_bool -Aclippy::redundant_pattern_matching --cap-lints warn"
lint = "clippy --all-targets -- --cap-lints warn"

[target.x86_64-pc-windows-msvc]
linker = "rust-lld"
Expand Down
1 change: 0 additions & 1 deletion src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- 'crates/proc-macro-api/**'
- 'crates/proc-macro-srv/**'
- 'crates/proc-macro-srv-cli/**'
- 'crates/proc-macro-test/**'
rust:
needs: changes
Expand Down
71 changes: 55 additions & 16 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ dependencies = [
"profile",
"rust-analyzer-salsa",
"rustc-hash",
"semver",
"span",
"stdx",
"syntax",
"test-utils",
"triomphe",
"tt",
"vfs",
]

Expand Down Expand Up @@ -516,8 +516,10 @@ dependencies = [
"rustc-dependencies",
"rustc-hash",
"smallvec",
"span",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"tracing",
"triomphe",
Expand All @@ -542,6 +544,7 @@ dependencies = [
"profile",
"rustc-hash",
"smallvec",
"span",
"stdx",
"syntax",
"tracing",
Expand Down Expand Up @@ -581,6 +584,7 @@ dependencies = [
"smallvec",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"tracing",
"tracing-subscriber",
Expand Down Expand Up @@ -624,6 +628,7 @@ dependencies = [
"smallvec",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"text-edit",
"toolchain",
Expand All @@ -647,6 +652,7 @@ dependencies = [
"sourcegen",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"text-edit",
]
Expand All @@ -666,6 +672,7 @@ dependencies = [
"smallvec",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"text-edit",
]
Expand Down Expand Up @@ -694,8 +701,10 @@ dependencies = [
"rayon",
"rustc-hash",
"sourcegen",
"span",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"text-edit",
"tracing",
Expand All @@ -720,6 +729,7 @@ dependencies = [
"sourcegen",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"text-edit",
]
Expand All @@ -737,6 +747,7 @@ dependencies = [
"parser",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"text-edit",
"triomphe",
Expand Down Expand Up @@ -903,11 +914,13 @@ version = "0.0.0"
dependencies = [
"anyhow",
"crossbeam-channel",
"hir-expand",
"ide",
"ide-db",
"itertools",
"proc-macro-api",
"project-model",
"span",
"tracing",
"tt",
"vfs",
Expand All @@ -932,33 +945,33 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"

[[package]]
name = "lsp-server"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b52dccdf3302eefab8c8a1273047f0a3c3dca4b527c8458d00c09484c8371928"
version = "0.7.6"
dependencies = [
"crossbeam-channel",
"ctrlc",
"log",
"lsp-types",
"serde",
"serde_json",
]

[[package]]
name = "lsp-server"
version = "0.7.5"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "248f65b78f6db5d8e1b1604b4098a28b43d21a8eb1deeca22b1c421b276c7095"
dependencies = [
"crossbeam-channel",
"ctrlc",
"log",
"lsp-types",
"serde",
"serde_json",
]

[[package]]
name = "lsp-types"
version = "0.94.0"
version = "0.95.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b63735a13a1f9cd4f4835223d828ed9c2e35c8c5e61837774399f558b6a1237"
checksum = "158c1911354ef73e8fe42da6b10c0484cb65c7f1007f28022e847706c1ab6984"
dependencies = [
"bitflags 1.3.2",
"serde",
Expand All @@ -975,6 +988,7 @@ dependencies = [
"parser",
"rustc-hash",
"smallvec",
"span",
"stdx",
"syntax",
"test-utils",
Expand Down Expand Up @@ -1251,6 +1265,7 @@ dependencies = [
"serde",
"serde_json",
"snap",
"span",
"stdx",
"text-size",
"tracing",
Expand All @@ -1262,6 +1277,7 @@ dependencies = [
name = "proc-macro-srv"
version = "0.0.0"
dependencies = [
"base-db",
"expect-test",
"libloading",
"mbe",
Expand All @@ -1270,6 +1286,7 @@ dependencies = [
"paths",
"proc-macro-api",
"proc-macro-test",
"span",
"stdx",
"tt",
]
Expand All @@ -1287,14 +1304,9 @@ name = "proc-macro-test"
version = "0.0.0"
dependencies = [
"cargo_metadata",
"proc-macro-test-impl",
"toolchain",
]

[[package]]
name = "proc-macro-test-impl"
version = "0.0.0"

[[package]]
name = "proc-macro2"
version = "1.0.69"
Expand Down Expand Up @@ -1514,7 +1526,7 @@ dependencies = [
"ide-ssr",
"itertools",
"load-cargo",
"lsp-server 0.7.4",
"lsp-server 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lsp-types",
"mbe",
"mimalloc",
Expand All @@ -1535,6 +1547,7 @@ dependencies = [
"sourcegen",
"stdx",
"syntax",
"test-fixture",
"test-utils",
"tikv-jemallocator",
"toolchain",
Expand Down Expand Up @@ -1726,6 +1739,17 @@ dependencies = [
"xshell",
]

[[package]]
name = "span"
version = "0.0.0"
dependencies = [
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-analyzer-salsa",
"stdx",
"syntax",
"vfs",
]

[[package]]
name = "static_assertions"
version = "1.1.0"
Expand Down Expand Up @@ -1796,6 +1820,20 @@ dependencies = [
"ungrammar",
]

[[package]]
name = "test-fixture"
version = "0.0.0"
dependencies = [
"base-db",
"cfg",
"hir-expand",
"rustc-hash",
"span",
"stdx",
"test-utils",
"tt",
]

[[package]]
name = "test-utils"
version = "0.0.0"
Expand Down Expand Up @@ -1998,6 +2036,7 @@ name = "tt"
version = "0.0.0"
dependencies = [
"smol_str",
"span",
"stdx",
"text-size",
]
Expand Down
25 changes: 19 additions & 6 deletions src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[workspace]
members = ["xtask/", "lib/*", "crates/*"]
exclude = ["crates/proc-macro-test/imp"]
exclude = ["crates/proc-macro-srv/proc-macro-test/"]
resolver = "2"

[workspace.package]
rust-version = "1.70"
rust-version = "1.74"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["rust-analyzer team"]
Expand Down Expand Up @@ -70,10 +70,9 @@ proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" }
proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" }
profile = { path = "./crates/profile", version = "0.0.0" }
project-model = { path = "./crates/project-model", version = "0.0.0" }
sourcegen = { path = "./crates/sourcegen", version = "0.0.0" }
span = { path = "./crates/span", version = "0.0.0" }
stdx = { path = "./crates/stdx", version = "0.0.0" }
syntax = { path = "./crates/syntax", version = "0.0.0" }
test-utils = { path = "./crates/test-utils", version = "0.0.0" }
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
tt = { path = "./crates/tt", version = "0.0.0" }
Expand All @@ -82,19 +81,25 @@ vfs = { path = "./crates/vfs", version = "0.0.0" }
rustc-dependencies = { path = "./crates/rustc-dependencies", version = "0.0.0" }

# local crates that aren't published to crates.io. These should not have versions.
proc-macro-test = { path = "./crates/proc-macro-test" }
sourcegen = { path = "./crates/sourcegen" }
test-fixture = { path = "./crates/test-fixture" }
test-utils = { path = "./crates/test-utils" }

# In-tree crates that are published separately and follow semver. See lib/README.md
line-index = { version = "0.1.1" }
la-arena = { version = "0.3.1" }
lsp-server = { version = "0.7.4" }
lsp-server = { version = "0.7.6" }

# non-local crates
anyhow = "1.0.75"
arrayvec = "0.7.4"
bitflags = "2.4.1"
cargo_metadata = "0.18.1"
command-group = "2.0.1"
crossbeam-channel = "0.5.8"
dissimilar = "1.0.7"
either = "1.9.0"
expect-test = "1.4.0"
hashbrown = { version = "0.14", features = [
"inline-more",
], default-features = false }
Expand All @@ -105,6 +110,7 @@ nohash-hasher = "0.2.0"
rayon = "1.8.0"
rust-analyzer-salsa = "0.17.0-pre.4"
rustc-hash = "1.1.0"
semver = "1.0.14"
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"
smallvec = { version = "1.10.0", features = [
Expand All @@ -124,5 +130,12 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
xshell = "0.2.5"


# We need to freeze the version of the crate, as the raw-api feature is considered unstable
dashmap = { version = "=5.5.3", features = ["raw-api"] }

[workspace.lints.clippy]
collapsible_if = "allow"
needless_pass_by_value = "allow"
nonminimal_bool = "allow"
redundant_pattern_matching = "allow"
7 changes: 5 additions & 2 deletions src/tools/rust-analyzer/crates/base-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ la-arena.workspace = true
rust-analyzer-salsa.workspace = true
rustc-hash.workspace = true
triomphe.workspace = true
semver.workspace = true

# local deps
cfg.workspace = true
profile.workspace = true
stdx.workspace = true
syntax.workspace = true
test-utils.workspace = true
tt.workspace = true
vfs.workspace = true
span.workspace = true

[lints]
workspace = true
Loading

0 comments on commit 090d5ea

Please sign in to comment.