Skip to content

Commit 0a79d4d

Browse files
Rollup merge of rust-lang#157599 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@57116fa. Created using https://github.com/rust-lang/josh-sync. r? @ghost
2 parents 029c9e1 + 475a2df commit 0a79d4d

101 files changed

Lines changed: 2696 additions & 1087 deletions

File tree

Some content is hidden

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

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,44 @@ jobs:
2929
- os: windows-latest
3030
target: x86_64-pc-windows-msvc
3131
code-target: win32-x64
32+
allocator: mimalloc
3233
pgo: clap-rs/clap@v4.5.36
3334
- os: windows-latest
3435
target: i686-pc-windows-msvc
36+
allocator: mimalloc
3537
pgo: clap-rs/clap@v4.5.36
3638
- os: windows-latest
3739
target: aarch64-pc-windows-msvc
3840
code-target: win32-arm64
41+
allocator: mimalloc
3942
- os: ubuntu-latest
4043
target: x86_64-unknown-linux-gnu
4144
# Use a container with glibc 2.28
4245
# Zig is not used because it doesn't work with PGO
4346
container: quay.io/pypa/manylinux_2_28_x86_64
4447
code-target: linux-x64
48+
allocator: system
4549
pgo: clap-rs/clap@v4.5.36
4650
- os: ubuntu-24.04-arm
4751
target: aarch64-unknown-linux-gnu
4852
container: quay.io/pypa/manylinux_2_28_aarch64
4953
code-target: linux-arm64
54+
allocator: system
5055
pgo: clap-rs/clap@v4.5.36
5156
- os: ubuntu-latest
5257
target: arm-unknown-linux-gnueabihf
5358
zig_target: arm-unknown-linux-gnueabihf.2.28
5459
code-target: linux-armhf
60+
allocator: system
5561
- os: macos-14
5662
target: x86_64-apple-darwin
5763
code-target: darwin-x64
64+
allocator: system
5865
pgo: clap-rs/clap@v4.5.36
5966
- os: macos-14
6067
target: aarch64-apple-darwin
6168
code-target: darwin-arm64
69+
allocator: system
6270
pgo: clap-rs/clap@v4.5.36
6371

6472
name: dist (${{ matrix.target }})
@@ -67,6 +75,7 @@ jobs:
6775

6876
env:
6977
RA_TARGET: ${{ matrix.target }}
78+
ALLOCATOR_FLAG: ${{ matrix.allocator != 'system' && format('--{0}', matrix.allocator) || '' }}
7079

7180
steps:
7281
- name: Checkout repository
@@ -102,11 +111,11 @@ jobs:
102111
103112
- name: Dist (plain)
104113
if: ${{ !matrix.zig_target }}
105-
run: cargo xtask dist --client-patch-version ${{ github.run_number }} ${{ matrix.pgo && format('--pgo {0}', matrix.pgo) || ''}}
114+
run: cargo xtask dist --client-patch-version ${{ github.run_number }} ${{ env.ALLOCATOR_FLAG }} ${{ matrix.pgo && format('--pgo {0}', matrix.pgo) || ''}}
106115

107116
- name: Dist (using zigbuild)
108117
if: ${{ matrix.zig_target }}
109-
run: RA_TARGET=${{ matrix.zig_target}} cargo xtask dist --client-patch-version ${{ github.run_number }} --zig ${{ matrix.pgo && format('--pgo {0}', matrix.pgo) || ''}}
118+
run: RA_TARGET=${{ matrix.zig_target}} cargo xtask dist --client-patch-version ${{ github.run_number }} --zig ${{ env.ALLOCATOR_FLAG }} ${{ matrix.pgo && format('--pgo {0}', matrix.pgo) || ''}}
110119

111120
- run: npm ci
112121
working-directory: editors/code

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Deploy Docs
3333
if: github.event_name == 'push' && github.repository == 'rust-lang/rust-analyzer' && github.ref == 'refs/heads/master'
34-
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
34+
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
3535
with:
3636
github_token: ${{ secrets.GITHUB_TOKEN }}
3737
publish_branch: gh-pages
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
We allow using AI (i.e., LLMs) as tools for contributing to rust-analyzer.
2+
However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
3+
We hold a high bar for all contributions to our projects.
4+
5+
**AI should not be used to generate comments when communicating with maintainers**.
6+
We expect comments on our projects to be written by humans.
7+
We may hide any comments that we believe are AI generated.
8+
9+
If you are opening an issue, we expect you to describe the problem in your own words.
10+
11+
If you are opening a pull request, we expect you to be able to explain the proposed changes in your own words. This includes the pull request body and responses to questions.
12+
**Do not copy responses from the AI when replying to questions from maintainers.**
13+
14+
Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
15+
**We do not allow autonomous agents to be used to open pull requests or issues to our projects**.
16+
We will close any pull requests that we believe were created autonomously.
17+
18+
If you wish to include context from an interaction with AI in your comments, it must be in a quote block (e.g., using `>`) and disclosed as such.
19+
It must be accompanied by human commentary explaining the relevance and implications of the context.
20+
Do not share long snippets.
21+
22+
We understand that AI is useful when communicating as a non-native English speaker.
23+
If you are using AI to edit your comments for this purpose, please take the time to ensure it reflects your own voice and ideas.
24+
If using AI for translation, we recommend writing in your native language and including the AI translation in a quote block.
25+
26+
This policy was adapted from [uv's AI policy].
27+
28+
[uv's AI policy]: https://github.com/astral-sh/.github/blob/c5187e200db51bfe11d56e13053d29bd3793fdd8/AI_POLICY.md

src/tools/rust-analyzer/CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ it out of scope (be it due to generally not fitting in with rust-analyzer, or ju
3434
maintenance capacity). If there already is a feature issue open but it is not clear whether it is
3535
considered accepted feel free to just drop a comment and ask!
3636

37-
## Use of AI tools
37+
## Use of AI
3838

39-
AI tool use is not discouraged on the rust-analyzer codebase, as long as it meets our quality standards.
40-
We kindly ask you to disclose usage of AI tools in your contributions.
41-
If you used them without disclosing it, we may reject your contribution on that basis alone due to the assumption that you have, most likely, not reviewed your own submission (so why should we?).
39+
All use of AI in contributions must follow the [AI Policy](./AI_POLICY.md).
4240

43-
We may still reject AI-assisted contributions if we deem the quality of the contribution to be unsatisfactory as to reduce impact on the team's review budget.
41+
Contributions not following the AI Policy will be closed.

0 commit comments

Comments
 (0)