Skip to content

Commit 54692c3

Browse files
committed
Auto merge of rust-lang#124202 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer` r? `@ghost`
2 parents 8cf135e + b0a18da commit 54692c3

File tree

237 files changed

+6206
-3270
lines changed

Some content is hidden

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

237 files changed

+6206
-3270
lines changed

src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Otherwise please try to provide information which will help us to fix the issue
2222

2323
**rustc version**: (eg. output of `rustc -V`)
2424

25+
**editor or extension**: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
26+
2527
**relevant settings**: (eg. client settings, or environment variables like `CARGO`, `RUSTC`, `RUSTUP_HOME` or `CARGO_HOME`)
2628

2729
**repository link (if public, optional)**: (eg. [rust-analyzer](https://github.com/rust-lang/rust-analyzer))

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }}
9292

9393
- name: Test
94-
if: matrix.os == 'ubuntu-latest' || github.event_name == 'push'
94+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' || github.event_name == 'push'
9595
run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet
9696

9797
- name: Switch to stable toolchain

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
key: ${{ runner.os }}-target-${{ github.sha }}
5959

6060
- name: Upload build metrics
61-
uses: actions/upload-artifact@v3
61+
uses: actions/upload-artifact@v4
6262
with:
6363
name: build-${{ github.sha }}
6464
path: target/build.json
@@ -95,7 +95,7 @@ jobs:
9595
run: cargo xtask metrics "${{ matrix.names }}"
9696

9797
- name: Upload metrics
98-
uses: actions/upload-artifact@v3
98+
uses: actions/upload-artifact@v4
9999
with:
100100
name: ${{ matrix.names }}-${{ github.sha }}
101101
path: target/${{ matrix.names }}.json
@@ -109,32 +109,32 @@ jobs:
109109
uses: actions/checkout@v4
110110

111111
- name: Download build metrics
112-
uses: actions/download-artifact@v3
112+
uses: actions/download-artifact@v4
113113
with:
114114
name: build-${{ github.sha }}
115115

116116
- name: Download self metrics
117-
uses: actions/download-artifact@v3
117+
uses: actions/download-artifact@v4
118118
with:
119119
name: self-${{ github.sha }}
120120

121121
- name: Download ripgrep-13.0.0 metrics
122-
uses: actions/download-artifact@v3
122+
uses: actions/download-artifact@v4
123123
with:
124124
name: ripgrep-13.0.0-${{ github.sha }}
125125

126126
- name: Download webrender-2022 metrics
127-
uses: actions/download-artifact@v3
127+
uses: actions/download-artifact@v4
128128
with:
129129
name: webrender-2022-${{ github.sha }}
130130

131131
- name: Download diesel-1.4.8 metrics
132-
uses: actions/download-artifact@v3
132+
uses: actions/download-artifact@v4
133133
with:
134134
name: diesel-1.4.8-${{ github.sha }}
135135

136136
- name: Download hyper-0.14.18 metrics
137-
uses: actions/download-artifact@v3
137+
uses: actions/download-artifact@v4
138138
with:
139139
name: hyper-0.14.18-${{ github.sha }}
140140

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing to rust-analyzer
2+
3+
Thank you for your interest in contributing to rust-analyzer! There are many ways to contribute
4+
and we appreciate all of them.
5+
6+
To get a quick overview of the crates and structure of the project take a look at the
7+
[./docs/dev](./docs/dev) folder.
8+
9+
If you have any questions please ask them in the [rust-analyzer zulip stream](
10+
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer) or if unsure where
11+
to start out when working on a concrete issue drop a comment on the related issue for mentoring
12+
instructions (general discussions are recommended to happen on zulip though).
13+
14+
## Fixing a bug or improving a feature
15+
16+
Generally it's fine to just work on these kinds of things and put a pull-request out for it. If there
17+
is an issue accompanying it make sure to link it in the pull request description so it can be closed
18+
afterwards or linked for context.
19+
20+
If you want to find something to fix or work on keep a look out for the `C-bug` and `C-enhancement`
21+
labels.
22+
23+
## Implementing a new feature
24+
25+
It's advised to first open an issue for any kind of new feature so the team can tell upfront whether
26+
the feature is desirable or not before any implementation work happens. We want to minimize the
27+
possibility of someone putting a lot of work into a feature that is then going to waste as we deem
28+
it out of scope (be it due to generally not fitting in with rust-analyzer, or just not having the
29+
maintenance capacity). If there already is a feature issue open but it is not clear whether it is
30+
considered accepted feel free to just drop a comment and ask!

src/tools/rust-analyzer/Cargo.lock

+66-9
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
161161

162162
[[package]]
163163
name = "chalk-derive"
164-
version = "0.96.0"
164+
version = "0.97.0"
165165
source = "registry+https://github.com/rust-lang/crates.io-index"
166-
checksum = "5676cea088c32290fe65c82895be9d06dd21e0fa49bb97ca840529e9417ab71a"
166+
checksum = "92a0aedc4ac2adc5c0b7dc9ec38c5c816284ad28da6d4ecd01873b9683f54972"
167167
dependencies = [
168168
"proc-macro2",
169169
"quote",
@@ -173,20 +173,19 @@ dependencies = [
173173

174174
[[package]]
175175
name = "chalk-ir"
176-
version = "0.96.0"
176+
version = "0.97.0"
177177
source = "registry+https://github.com/rust-lang/crates.io-index"
178-
checksum = "ff550c2cdd63ff74394214dce03d06386928a641c0f08837535f04af573a966d"
178+
checksum = "db18493569b190f7266a04901e520fc3a5c00564475154287906f8a27302c119"
179179
dependencies = [
180180
"bitflags 2.4.2",
181181
"chalk-derive",
182-
"lazy_static",
183182
]
184183

185184
[[package]]
186185
name = "chalk-recursive"
187-
version = "0.96.0"
186+
version = "0.97.0"
188187
source = "registry+https://github.com/rust-lang/crates.io-index"
189-
checksum = "4c4559e5c9b200240453b07d893f9c3c74413b53b0d33cbe272c68b0b77aa1c3"
188+
checksum = "ae4ba8ce5bd2e1b59f1f79495bc8704db09a8285e51cc5ddf01d9baee1bf447d"
190189
dependencies = [
191190
"chalk-derive",
192191
"chalk-ir",
@@ -197,9 +196,9 @@ dependencies = [
197196

198197
[[package]]
199198
name = "chalk-solve"
200-
version = "0.96.0"
199+
version = "0.97.0"
201200
source = "registry+https://github.com/rust-lang/crates.io-index"
202-
checksum = "0882e68ce9eb5a0a2413806538494d19df6ee520ab17d1faf489e952f32e98b8"
201+
checksum = "b2ec1b3b7f7b1ec38f099ef39c2bc3ea29335be1b8316d114baff46d96d131e9"
203202
dependencies = [
204203
"chalk-derive",
205204
"chalk-ir",
@@ -552,6 +551,7 @@ dependencies = [
552551
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
553552
"limit",
554553
"mbe",
554+
"parser",
555555
"rustc-hash",
556556
"smallvec",
557557
"span",
@@ -695,6 +695,7 @@ version = "0.0.0"
695695
dependencies = [
696696
"arrayvec",
697697
"base-db",
698+
"bitflags 2.4.2",
698699
"cov-mark",
699700
"crossbeam-channel",
700701
"either",
@@ -781,6 +782,7 @@ checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
781782
dependencies = [
782783
"equivalent",
783784
"hashbrown",
785+
"serde",
784786
]
785787

786788
[[package]]
@@ -1594,6 +1596,7 @@ dependencies = [
15941596
"ide",
15951597
"ide-db",
15961598
"ide-ssr",
1599+
"indexmap",
15971600
"itertools",
15981601
"load-cargo",
15991602
"lsp-server 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1622,6 +1625,7 @@ dependencies = [
16221625
"test-fixture",
16231626
"test-utils",
16241627
"tikv-jemallocator",
1628+
"toml",
16251629
"toolchain",
16261630
"tracing",
16271631
"tracing-subscriber",
@@ -1775,6 +1779,15 @@ dependencies = [
17751779
"syn",
17761780
]
17771781

1782+
[[package]]
1783+
name = "serde_spanned"
1784+
version = "0.6.5"
1785+
source = "registry+https://github.com/rust-lang/crates.io-index"
1786+
checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
1787+
dependencies = [
1788+
"serde",
1789+
]
1790+
17781791
[[package]]
17791792
name = "sharded-slab"
17801793
version = "0.1.7"
@@ -1822,6 +1835,7 @@ dependencies = [
18221835
"salsa",
18231836
"stdx",
18241837
"syntax",
1838+
"text-size",
18251839
"vfs",
18261840
]
18271841

@@ -2025,6 +2039,40 @@ version = "0.1.1"
20252039
source = "registry+https://github.com/rust-lang/crates.io-index"
20262040
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
20272041

2042+
[[package]]
2043+
name = "toml"
2044+
version = "0.8.8"
2045+
source = "registry+https://github.com/rust-lang/crates.io-index"
2046+
checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
2047+
dependencies = [
2048+
"serde",
2049+
"serde_spanned",
2050+
"toml_datetime",
2051+
"toml_edit",
2052+
]
2053+
2054+
[[package]]
2055+
name = "toml_datetime"
2056+
version = "0.6.5"
2057+
source = "registry+https://github.com/rust-lang/crates.io-index"
2058+
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
2059+
dependencies = [
2060+
"serde",
2061+
]
2062+
2063+
[[package]]
2064+
name = "toml_edit"
2065+
version = "0.21.0"
2066+
source = "registry+https://github.com/rust-lang/crates.io-index"
2067+
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
2068+
dependencies = [
2069+
"indexmap",
2070+
"serde",
2071+
"serde_spanned",
2072+
"toml_datetime",
2073+
"winnow",
2074+
]
2075+
20282076
[[package]]
20292077
name = "toolchain"
20302078
version = "0.0.0"
@@ -2401,6 +2449,15 @@ version = "0.52.4"
24012449
source = "registry+https://github.com/rust-lang/crates.io-index"
24022450
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
24032451

2452+
[[package]]
2453+
name = "winnow"
2454+
version = "0.5.32"
2455+
source = "registry+https://github.com/rust-lang/crates.io-index"
2456+
checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6"
2457+
dependencies = [
2458+
"memchr",
2459+
]
2460+
24042461
[[package]]
24052462
name = "write-json"
24062463
version = "0.1.4"

src/tools/rust-analyzer/Cargo.toml

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ smol_str.opt-level = 3
2222
text-size.opt-level = 3
2323
# This speeds up `cargo xtask dist`.
2424
miniz_oxide.opt-level = 3
25+
salsa.opt-level = 3
2526

2627
[profile.release]
2728
incremental = true
@@ -106,10 +107,10 @@ arrayvec = "0.7.4"
106107
bitflags = "2.4.1"
107108
cargo_metadata = "0.18.1"
108109
camino = "1.1.6"
109-
chalk-solve = { version = "0.96.0", default-features = false }
110-
chalk-ir = "0.96.0"
111-
chalk-recursive = { version = "0.96.0", default-features = false }
112-
chalk-derive = "0.96.0"
110+
chalk-solve = { version = "0.97.0", default-features = false }
111+
chalk-ir = "0.97.0"
112+
chalk-recursive = { version = "0.97.0", default-features = false }
113+
chalk-derive = "0.97.0"
113114
command-group = "2.0.1"
114115
crossbeam-channel = "0.5.8"
115116
dissimilar = "1.0.7"
@@ -188,6 +189,8 @@ enum_variant_names = "allow"
188189
new_ret_no_self = "allow"
189190
# Has a bunch of false positives
190191
useless_asref = "allow"
192+
# Has false positives
193+
assigning_clones = "allow"
191194

192195
## Following lints should be tackled at some point
193196
too_many_arguments = "allow"

src/tools/rust-analyzer/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ https://rust-analyzer.github.io/manual.html#installation
1313

1414
## Documentation
1515

16-
If you want to **contribute** to rust-analyzer or are just curious about how
17-
things work under the hood, check the [./docs/dev](./docs/dev) folder.
16+
If you want to **contribute** to rust-analyzer check out the [CONTRIBUTING.md](./CONTRIBUTING.md) or
17+
if you are just curious about how things work under the hood, check the [./docs/dev](./docs/dev)
18+
folder.
1819

1920
If you want to **use** rust-analyzer's language server with your editor of
2021
choice, check [the manual](https://rust-analyzer.github.io/manual.html) folder.

0 commit comments

Comments
 (0)