Skip to content

Commit

Permalink
Auto merge of #124202 - lnicola:sync-from-ra, 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 Apr 20, 2024
2 parents 8cf135e + b0a18da commit 54692c3
Show file tree
Hide file tree
Showing 237 changed files with 6,206 additions and 3,270 deletions.
2 changes: 2 additions & 0 deletions src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Otherwise please try to provide information which will help us to fix the issue

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

**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)

**relevant settings**: (eg. client settings, or environment variables like `CARGO`, `RUSTC`, `RUSTUP_HOME` or `CARGO_HOME`)

**repository link (if public, optional)**: (eg. [rust-analyzer](https://github.com/rust-lang/rust-analyzer))
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }}

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

- name: Switch to stable toolchain
Expand Down
16 changes: 8 additions & 8 deletions src/tools/rust-analyzer/.github/workflows/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
key: ${{ runner.os }}-target-${{ github.sha }}

- name: Upload build metrics
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-${{ github.sha }}
path: target/build.json
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
run: cargo xtask metrics "${{ matrix.names }}"

- name: Upload metrics
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.names }}-${{ github.sha }}
path: target/${{ matrix.names }}.json
Expand All @@ -109,32 +109,32 @@ jobs:
uses: actions/checkout@v4

- name: Download build metrics
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-${{ github.sha }}

- name: Download self metrics
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: self-${{ github.sha }}

- name: Download ripgrep-13.0.0 metrics
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ripgrep-13.0.0-${{ github.sha }}

- name: Download webrender-2022 metrics
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: webrender-2022-${{ github.sha }}

- name: Download diesel-1.4.8 metrics
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: diesel-1.4.8-${{ github.sha }}

- name: Download hyper-0.14.18 metrics
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: hyper-0.14.18-${{ github.sha }}

Expand Down
30 changes: 30 additions & 0 deletions src/tools/rust-analyzer/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Contributing to rust-analyzer

Thank you for your interest in contributing to rust-analyzer! There are many ways to contribute
and we appreciate all of them.

To get a quick overview of the crates and structure of the project take a look at the
[./docs/dev](./docs/dev) folder.

If you have any questions please ask them in the [rust-analyzer zulip stream](
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer) or if unsure where
to start out when working on a concrete issue drop a comment on the related issue for mentoring
instructions (general discussions are recommended to happen on zulip though).

## Fixing a bug or improving a feature

Generally it's fine to just work on these kinds of things and put a pull-request out for it. If there
is an issue accompanying it make sure to link it in the pull request description so it can be closed
afterwards or linked for context.

If you want to find something to fix or work on keep a look out for the `C-bug` and `C-enhancement`
labels.

## Implementing a new feature

It's advised to first open an issue for any kind of new feature so the team can tell upfront whether
the feature is desirable or not before any implementation work happens. We want to minimize the
possibility of someone putting a lot of work into a feature that is then going to waste as we deem
it out of scope (be it due to generally not fitting in with rust-analyzer, or just not having the
maintenance capacity). If there already is a feature issue open but it is not clear whether it is
considered accepted feel free to just drop a comment and ask!
75 changes: 66 additions & 9 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "chalk-derive"
version = "0.96.0"
version = "0.97.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5676cea088c32290fe65c82895be9d06dd21e0fa49bb97ca840529e9417ab71a"
checksum = "92a0aedc4ac2adc5c0b7dc9ec38c5c816284ad28da6d4ecd01873b9683f54972"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -173,20 +173,19 @@ dependencies = [

[[package]]
name = "chalk-ir"
version = "0.96.0"
version = "0.97.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff550c2cdd63ff74394214dce03d06386928a641c0f08837535f04af573a966d"
checksum = "db18493569b190f7266a04901e520fc3a5c00564475154287906f8a27302c119"
dependencies = [
"bitflags 2.4.2",
"chalk-derive",
"lazy_static",
]

[[package]]
name = "chalk-recursive"
version = "0.96.0"
version = "0.97.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c4559e5c9b200240453b07d893f9c3c74413b53b0d33cbe272c68b0b77aa1c3"
checksum = "ae4ba8ce5bd2e1b59f1f79495bc8704db09a8285e51cc5ddf01d9baee1bf447d"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand All @@ -197,9 +196,9 @@ dependencies = [

[[package]]
name = "chalk-solve"
version = "0.96.0"
version = "0.97.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0882e68ce9eb5a0a2413806538494d19df6ee520ab17d1faf489e952f32e98b8"
checksum = "b2ec1b3b7f7b1ec38f099ef39c2bc3ea29335be1b8316d114baff46d96d131e9"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand Down Expand Up @@ -552,6 +551,7 @@ dependencies = [
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"limit",
"mbe",
"parser",
"rustc-hash",
"smallvec",
"span",
Expand Down Expand Up @@ -695,6 +695,7 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"base-db",
"bitflags 2.4.2",
"cov-mark",
"crossbeam-channel",
"either",
Expand Down Expand Up @@ -781,6 +782,7 @@ checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
dependencies = [
"equivalent",
"hashbrown",
"serde",
]

[[package]]
Expand Down Expand Up @@ -1594,6 +1596,7 @@ dependencies = [
"ide",
"ide-db",
"ide-ssr",
"indexmap",
"itertools",
"load-cargo",
"lsp-server 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -1622,6 +1625,7 @@ dependencies = [
"test-fixture",
"test-utils",
"tikv-jemallocator",
"toml",
"toolchain",
"tracing",
"tracing-subscriber",
Expand Down Expand Up @@ -1775,6 +1779,15 @@ dependencies = [
"syn",
]

[[package]]
name = "serde_spanned"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
dependencies = [
"serde",
]

[[package]]
name = "sharded-slab"
version = "0.1.7"
Expand Down Expand Up @@ -1822,6 +1835,7 @@ dependencies = [
"salsa",
"stdx",
"syntax",
"text-size",
"vfs",
]

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

[[package]]
name = "toml"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit",
]

[[package]]
name = "toml_datetime"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
dependencies = [
"serde",
]

[[package]]
name = "toml_edit"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
]

[[package]]
name = "toolchain"
version = "0.0.0"
Expand Down Expand Up @@ -2401,6 +2449,15 @@ version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"

[[package]]
name = "winnow"
version = "0.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6"
dependencies = [
"memchr",
]

[[package]]
name = "write-json"
version = "0.1.4"
Expand Down
11 changes: 7 additions & 4 deletions src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ smol_str.opt-level = 3
text-size.opt-level = 3
# This speeds up `cargo xtask dist`.
miniz_oxide.opt-level = 3
salsa.opt-level = 3

[profile.release]
incremental = true
Expand Down Expand Up @@ -106,10 +107,10 @@ arrayvec = "0.7.4"
bitflags = "2.4.1"
cargo_metadata = "0.18.1"
camino = "1.1.6"
chalk-solve = { version = "0.96.0", default-features = false }
chalk-ir = "0.96.0"
chalk-recursive = { version = "0.96.0", default-features = false }
chalk-derive = "0.96.0"
chalk-solve = { version = "0.97.0", default-features = false }
chalk-ir = "0.97.0"
chalk-recursive = { version = "0.97.0", default-features = false }
chalk-derive = "0.97.0"
command-group = "2.0.1"
crossbeam-channel = "0.5.8"
dissimilar = "1.0.7"
Expand Down Expand Up @@ -188,6 +189,8 @@ enum_variant_names = "allow"
new_ret_no_self = "allow"
# Has a bunch of false positives
useless_asref = "allow"
# Has false positives
assigning_clones = "allow"

## Following lints should be tackled at some point
too_many_arguments = "allow"
Expand Down
5 changes: 3 additions & 2 deletions src/tools/rust-analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ https://rust-analyzer.github.io/manual.html#installation

## Documentation

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

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

0 comments on commit 54692c3

Please sign in to comment.