Skip to content

Commit 090d5ea

Browse files
committed
Auto merge of rust-lang#119542 - lnicola:sync-from-ra2, r=lnicola
Subtree update of `rust-analyzer` r? ghost
2 parents 139fb22 + b91d1c0 commit 090d5ea

File tree

241 files changed

+6915
-3074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+6915
-3074
lines changed

src/bootstrap/src/core/build_steps/tool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ pub struct RustAnalyzer {
594594
}
595595

596596
impl RustAnalyzer {
597-
pub const ALLOW_FEATURES: &'static str = "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink";
597+
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";
598598
}
599599

600600
impl Step for RustAnalyzer {

src/tools/rust-analyzer/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xtask = "run --package xtask --bin xtask --"
33
tq = "test -- -q"
44
qt = "tq"
5-
lint = "clippy --all-targets -- -Aclippy::collapsible_if -Aclippy::needless_pass_by_value -Aclippy::nonminimal_bool -Aclippy::redundant_pattern_matching --cap-lints warn"
5+
lint = "clippy --all-targets -- --cap-lints warn"
66

77
[target.x86_64-pc-windows-msvc]
88
linker = "rust-lld"

src/tools/rust-analyzer/.github/workflows/ci.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
- 'crates/proc-macro-api/**'
3939
- 'crates/proc-macro-srv/**'
4040
- 'crates/proc-macro-srv-cli/**'
41-
- 'crates/proc-macro-test/**'
4241
4342
rust:
4443
needs: changes

src/tools/rust-analyzer/Cargo.lock

+55-16
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ dependencies = [
7474
"profile",
7575
"rust-analyzer-salsa",
7676
"rustc-hash",
77+
"semver",
78+
"span",
7779
"stdx",
7880
"syntax",
79-
"test-utils",
8081
"triomphe",
81-
"tt",
8282
"vfs",
8383
]
8484

@@ -516,8 +516,10 @@ dependencies = [
516516
"rustc-dependencies",
517517
"rustc-hash",
518518
"smallvec",
519+
"span",
519520
"stdx",
520521
"syntax",
522+
"test-fixture",
521523
"test-utils",
522524
"tracing",
523525
"triomphe",
@@ -542,6 +544,7 @@ dependencies = [
542544
"profile",
543545
"rustc-hash",
544546
"smallvec",
547+
"span",
545548
"stdx",
546549
"syntax",
547550
"tracing",
@@ -581,6 +584,7 @@ dependencies = [
581584
"smallvec",
582585
"stdx",
583586
"syntax",
587+
"test-fixture",
584588
"test-utils",
585589
"tracing",
586590
"tracing-subscriber",
@@ -624,6 +628,7 @@ dependencies = [
624628
"smallvec",
625629
"stdx",
626630
"syntax",
631+
"test-fixture",
627632
"test-utils",
628633
"text-edit",
629634
"toolchain",
@@ -647,6 +652,7 @@ dependencies = [
647652
"sourcegen",
648653
"stdx",
649654
"syntax",
655+
"test-fixture",
650656
"test-utils",
651657
"text-edit",
652658
]
@@ -666,6 +672,7 @@ dependencies = [
666672
"smallvec",
667673
"stdx",
668674
"syntax",
675+
"test-fixture",
669676
"test-utils",
670677
"text-edit",
671678
]
@@ -694,8 +701,10 @@ dependencies = [
694701
"rayon",
695702
"rustc-hash",
696703
"sourcegen",
704+
"span",
697705
"stdx",
698706
"syntax",
707+
"test-fixture",
699708
"test-utils",
700709
"text-edit",
701710
"tracing",
@@ -720,6 +729,7 @@ dependencies = [
720729
"sourcegen",
721730
"stdx",
722731
"syntax",
732+
"test-fixture",
723733
"test-utils",
724734
"text-edit",
725735
]
@@ -737,6 +747,7 @@ dependencies = [
737747
"parser",
738748
"stdx",
739749
"syntax",
750+
"test-fixture",
740751
"test-utils",
741752
"text-edit",
742753
"triomphe",
@@ -903,11 +914,13 @@ version = "0.0.0"
903914
dependencies = [
904915
"anyhow",
905916
"crossbeam-channel",
917+
"hir-expand",
906918
"ide",
907919
"ide-db",
908920
"itertools",
909921
"proc-macro-api",
910922
"project-model",
923+
"span",
911924
"tracing",
912925
"tt",
913926
"vfs",
@@ -932,33 +945,33 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
932945

933946
[[package]]
934947
name = "lsp-server"
935-
version = "0.7.4"
936-
source = "registry+https://github.com/rust-lang/crates.io-index"
937-
checksum = "b52dccdf3302eefab8c8a1273047f0a3c3dca4b527c8458d00c09484c8371928"
948+
version = "0.7.6"
938949
dependencies = [
939950
"crossbeam-channel",
951+
"ctrlc",
940952
"log",
953+
"lsp-types",
941954
"serde",
942955
"serde_json",
943956
]
944957

945958
[[package]]
946959
name = "lsp-server"
947-
version = "0.7.5"
960+
version = "0.7.6"
961+
source = "registry+https://github.com/rust-lang/crates.io-index"
962+
checksum = "248f65b78f6db5d8e1b1604b4098a28b43d21a8eb1deeca22b1c421b276c7095"
948963
dependencies = [
949964
"crossbeam-channel",
950-
"ctrlc",
951965
"log",
952-
"lsp-types",
953966
"serde",
954967
"serde_json",
955968
]
956969

957970
[[package]]
958971
name = "lsp-types"
959-
version = "0.94.0"
972+
version = "0.95.0"
960973
source = "registry+https://github.com/rust-lang/crates.io-index"
961-
checksum = "0b63735a13a1f9cd4f4835223d828ed9c2e35c8c5e61837774399f558b6a1237"
974+
checksum = "158c1911354ef73e8fe42da6b10c0484cb65c7f1007f28022e847706c1ab6984"
962975
dependencies = [
963976
"bitflags 1.3.2",
964977
"serde",
@@ -975,6 +988,7 @@ dependencies = [
975988
"parser",
976989
"rustc-hash",
977990
"smallvec",
991+
"span",
978992
"stdx",
979993
"syntax",
980994
"test-utils",
@@ -1251,6 +1265,7 @@ dependencies = [
12511265
"serde",
12521266
"serde_json",
12531267
"snap",
1268+
"span",
12541269
"stdx",
12551270
"text-size",
12561271
"tracing",
@@ -1262,6 +1277,7 @@ dependencies = [
12621277
name = "proc-macro-srv"
12631278
version = "0.0.0"
12641279
dependencies = [
1280+
"base-db",
12651281
"expect-test",
12661282
"libloading",
12671283
"mbe",
@@ -1270,6 +1286,7 @@ dependencies = [
12701286
"paths",
12711287
"proc-macro-api",
12721288
"proc-macro-test",
1289+
"span",
12731290
"stdx",
12741291
"tt",
12751292
]
@@ -1287,14 +1304,9 @@ name = "proc-macro-test"
12871304
version = "0.0.0"
12881305
dependencies = [
12891306
"cargo_metadata",
1290-
"proc-macro-test-impl",
12911307
"toolchain",
12921308
]
12931309

1294-
[[package]]
1295-
name = "proc-macro-test-impl"
1296-
version = "0.0.0"
1297-
12981310
[[package]]
12991311
name = "proc-macro2"
13001312
version = "1.0.69"
@@ -1514,7 +1526,7 @@ dependencies = [
15141526
"ide-ssr",
15151527
"itertools",
15161528
"load-cargo",
1517-
"lsp-server 0.7.4",
1529+
"lsp-server 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
15181530
"lsp-types",
15191531
"mbe",
15201532
"mimalloc",
@@ -1535,6 +1547,7 @@ dependencies = [
15351547
"sourcegen",
15361548
"stdx",
15371549
"syntax",
1550+
"test-fixture",
15381551
"test-utils",
15391552
"tikv-jemallocator",
15401553
"toolchain",
@@ -1726,6 +1739,17 @@ dependencies = [
17261739
"xshell",
17271740
]
17281741

1742+
[[package]]
1743+
name = "span"
1744+
version = "0.0.0"
1745+
dependencies = [
1746+
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
1747+
"rust-analyzer-salsa",
1748+
"stdx",
1749+
"syntax",
1750+
"vfs",
1751+
]
1752+
17291753
[[package]]
17301754
name = "static_assertions"
17311755
version = "1.1.0"
@@ -1796,6 +1820,20 @@ dependencies = [
17961820
"ungrammar",
17971821
]
17981822

1823+
[[package]]
1824+
name = "test-fixture"
1825+
version = "0.0.0"
1826+
dependencies = [
1827+
"base-db",
1828+
"cfg",
1829+
"hir-expand",
1830+
"rustc-hash",
1831+
"span",
1832+
"stdx",
1833+
"test-utils",
1834+
"tt",
1835+
]
1836+
17991837
[[package]]
18001838
name = "test-utils"
18011839
version = "0.0.0"
@@ -1998,6 +2036,7 @@ name = "tt"
19982036
version = "0.0.0"
19992037
dependencies = [
20002038
"smol_str",
2039+
"span",
20012040
"stdx",
20022041
"text-size",
20032042
]

src/tools/rust-analyzer/Cargo.toml

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[workspace]
22
members = ["xtask/", "lib/*", "crates/*"]
3-
exclude = ["crates/proc-macro-test/imp"]
3+
exclude = ["crates/proc-macro-srv/proc-macro-test/"]
44
resolver = "2"
55

66
[workspace.package]
7-
rust-version = "1.70"
7+
rust-version = "1.74"
88
edition = "2021"
99
license = "MIT OR Apache-2.0"
1010
authors = ["rust-analyzer team"]
@@ -70,10 +70,9 @@ proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" }
7070
proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" }
7171
profile = { path = "./crates/profile", version = "0.0.0" }
7272
project-model = { path = "./crates/project-model", version = "0.0.0" }
73-
sourcegen = { path = "./crates/sourcegen", version = "0.0.0" }
73+
span = { path = "./crates/span", version = "0.0.0" }
7474
stdx = { path = "./crates/stdx", version = "0.0.0" }
7575
syntax = { path = "./crates/syntax", version = "0.0.0" }
76-
test-utils = { path = "./crates/test-utils", version = "0.0.0" }
7776
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
7877
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
7978
tt = { path = "./crates/tt", version = "0.0.0" }
@@ -82,19 +81,25 @@ vfs = { path = "./crates/vfs", version = "0.0.0" }
8281
rustc-dependencies = { path = "./crates/rustc-dependencies", version = "0.0.0" }
8382

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

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

9293
# non-local crates
9394
anyhow = "1.0.75"
95+
arrayvec = "0.7.4"
9496
bitflags = "2.4.1"
9597
cargo_metadata = "0.18.1"
98+
command-group = "2.0.1"
99+
crossbeam-channel = "0.5.8"
96100
dissimilar = "1.0.7"
97101
either = "1.9.0"
102+
expect-test = "1.4.0"
98103
hashbrown = { version = "0.14", features = [
99104
"inline-more",
100105
], default-features = false }
@@ -105,6 +110,7 @@ nohash-hasher = "0.2.0"
105110
rayon = "1.8.0"
106111
rust-analyzer-salsa = "0.17.0-pre.4"
107112
rustc-hash = "1.1.0"
113+
semver = "1.0.14"
108114
serde = { version = "1.0.192", features = ["derive"] }
109115
serde_json = "1.0.108"
110116
smallvec = { version = "1.10.0", features = [
@@ -124,5 +130,12 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
124130
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
125131
xshell = "0.2.5"
126132

133+
127134
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
128135
dashmap = { version = "=5.5.3", features = ["raw-api"] }
136+
137+
[workspace.lints.clippy]
138+
collapsible_if = "allow"
139+
needless_pass_by_value = "allow"
140+
nonminimal_bool = "allow"
141+
redundant_pattern_matching = "allow"

src/tools/rust-analyzer/crates/base-db/Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ la-arena.workspace = true
1616
rust-analyzer-salsa.workspace = true
1717
rustc-hash.workspace = true
1818
triomphe.workspace = true
19+
semver.workspace = true
1920

2021
# local deps
2122
cfg.workspace = true
2223
profile.workspace = true
2324
stdx.workspace = true
2425
syntax.workspace = true
25-
test-utils.workspace = true
26-
tt.workspace = true
2726
vfs.workspace = true
27+
span.workspace = true
28+
29+
[lints]
30+
workspace = true

0 commit comments

Comments
 (0)