Skip to content

Subtree update of rust-analyzer #121255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 119 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
0380d98
highlight rustdoc
zhaouv Jan 10, 2024
1040c00
reformat
zhaouv Jan 16, 2024
32a1409
add files to .vscodeignore
zhaouv Jan 16, 2024
895bcce
fix: change issue number of waker_getters from #87021 to #96992.
tvallotton Dec 15, 2023
0816d49
Rollup merge of #118960 - tvallotton:local_waker, r=Mark-Simulacrum
matthiaskrgr Feb 5, 2024
e41ab35
Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-fro…
lnicola Feb 11, 2024
c990587
fix: Fix macro transcriber emitting incorrect lifetime tokens
Veykril Feb 11, 2024
bb3c7cf
Introduce term search to rust-analyzer
kilpkonn Dec 11, 2023
35eb0db
Add more documentation for term search
kilpkonn Dec 12, 2023
627255d
Add static method tactic
kilpkonn Dec 16, 2023
bdbdd83
Initial version of term_search for autocomplete
kilpkonn Dec 27, 2023
a946970
Add quantified trees to reduce autocomplete options
kilpkonn Jan 3, 2024
0b838e3
Expand target for autocompletion
kilpkonn Jan 6, 2024
88964c0
Optionally disable term search for autocompletion
kilpkonn Jan 22, 2024
1257913
Cleanup term search related changes
kilpkonn Feb 1, 2024
10d6a67
Merge branch 'master' into sync-from-rust
lnicola Feb 11, 2024
c06ca6c
Auto merge of #16532 - lnicola:sync-from-rust, r=lnicola
bors Feb 11, 2024
3356ebd
Update to latest rustc_pattern_analysis
Nadrieril Feb 11, 2024
b04e0df
`pattern_analysis` doesn't need an arena anymore
Nadrieril Feb 11, 2024
43caf83
Prefer `debug!` to `never!` and add regression test
Nadrieril Feb 11, 2024
b7972e5
Auto merge of #16533 - Nadrieril:update-pat-ana, r=HKalbasi
bors Feb 12, 2024
8f3209b
internal: tool discovery prefers sysroot tools
Veykril Feb 12, 2024
5e1b09b
Auto merge of #16537 - Veykril:sysroot-tools, r=Veykril
bors Feb 12, 2024
3c24189
Auto merge of #16530 - Veykril:missing-lt, r=Veykril
bors Feb 12, 2024
6d45afd
feat: ignored and disabled macro expansion
tamasfe Nov 17, 2023
ab50ec9
fix(macros): no diagnostics for disabled macro
tamasfe Nov 17, 2023
e2a985e
Encode disabled proc-macros via boolean flag, not special Expander
Veykril Feb 12, 2024
47b4dd7
Auto merge of #15923 - tamasfe:feat/better-ignored-macros2, r=Veykril
bors Feb 12, 2024
cdbf54f
flycheck: initial implementation of `$saved_file`
Wilfred Oct 4, 2023
818c30c
Auto merge of #16092 - kilpkonn:term_search_1, r=Veykril
bors Feb 12, 2024
d24db9f
Run npm run format
Veykril Feb 12, 2024
1811210
Auto merge of #15476 - Wilfred:implement-saved-file3, r=Veykril
bors Feb 12, 2024
c6bb352
Remove autoclosing pair <> in rustdoc
Veykril Feb 12, 2024
35b0d66
Auto merge of #16541 - Veykril:highlight-rustdoc, r=Veykril
bors Feb 12, 2024
2fa57d9
internal: macro_arg query always returns a TokenTree
Veykril Feb 12, 2024
cf87333
Auto merge of #16540 - Veykril:macro-arg, r=Veykril
bors Feb 12, 2024
0209c28
add completions to show only traits in trait `impl` statement
dfireBird Feb 12, 2024
a7641a8
fix: Fix target layout fetching
Veykril Feb 12, 2024
3770f73
Auto merge of #16545 - Veykril:fix-target-layout-fetch, r=Veykril
bors Feb 12, 2024
24a3c42
feat: completion list suggests constructor like & builder methods first
mustakimali Feb 12, 2024
0af14ef
chore: optimise
mustakimali Feb 12, 2024
45e05ab
Activate on top level `Cargo.toml` and `rust-project.json` files
DavisVaughan Feb 12, 2024
ca64359
remove eprintln! overwrite
odysa Feb 13, 2024
a980000
Auto merge of #16546 - odysa:minor/remove-eprintln, r=lnicola
bors Feb 13, 2024
6836551
Implement `literal_from_str` for proc macro srv
Tyrubias Jan 30, 2024
adf7adf
Add `syntax` crate as `proc-macro-srv` dep
Tyrubias Jan 30, 2024
e8c9ca2
Refactor shared `literal_from_str` code
Tyrubias Jan 30, 2024
6cd458f
Move `raw_delimiter_count` to `syntax` crate
Tyrubias Jan 30, 2024
027f263
Note `FIXME` for suffixes
Tyrubias Jan 30, 2024
965b14d
Fix compilation errors
Tyrubias Jan 30, 2024
cdb8a88
Fix more compilation errors
Tyrubias Jan 30, 2024
1918f9b
Address PR comments
Tyrubias Jan 30, 2024
4923b8a
Return `Option<Parse<ast::Literal>>` from `ast::Literal::parse`
Tyrubias Feb 13, 2024
2c76104
fix: clippy
mustakimali Feb 13, 2024
925705e
Auto merge of #16446 - Tyrubias:literal_from_str, r=Veykril
bors Feb 13, 2024
ed57008
fix: Validate literals in proc-macro-srv FreeFunctions::literal_from_str
Veykril Feb 13, 2024
e944a27
Auto merge of #16547 - Veykril:proc-macro-literals, r=Veykril
bors Feb 13, 2024
3c4d642
Auto merge of #16117 - mustakimali:mo-order, r=Veykril
bors Feb 13, 2024
9897662
add completions to show only traits with qualified path prefix
dfireBird Feb 13, 2024
0e47bef
fix flyimport showing other types in `impl` trait statement
dfireBird Feb 13, 2024
22ca3fd
Auto merge of #16550 - DavisVaughan:feature/activate-on-top-level-car…
bors Feb 13, 2024
7f66178
Simplify
Veykril Feb 13, 2024
fc1ee61
Auto merge of #16544 - dfireBird:impl_trait_completion, r=Veykril
bors Feb 13, 2024
ccccc29
fix: Recover from `=` in record constructor field assignment
Veykril Feb 13, 2024
bf115a6
fix: Recover from `=` in record pattern field
Veykril Feb 13, 2024
2c05da1
Auto merge of #16553 - Veykril:field-lit-recovery, r=Veykril
bors Feb 13, 2024
a981db5
fix: Pass .cargo/config.toml env vars to proc-macro server
Veykril Feb 13, 2024
a02a219
Auto merge of #16554 - Veykril:proc-macro-cargo-config-env, r=Veykril
bors Feb 13, 2024
931f563
Update JsonProject to include optional fields
Wilfred Feb 13, 2024
113f054
Auto merge of #16558 - Wilfred:json_project_ts, r=lnicola
bors Feb 14, 2024
c738655
Set channel override when querying the sysroot metadata
lnicola Feb 14, 2024
efe68e3
Auto merge of #16560 - lnicola:sysroot-metadata, r=Veykril
bors Feb 14, 2024
c125e8c
Add github ci problem matcher for clippy
Veykril Feb 14, 2024
f481181
Run rustfmt directly on CI
Veykril Feb 14, 2024
000ce5d
Auto merge of #16562 - Veykril:problem-matcher, r=Veykril
bors Feb 14, 2024
465ddef
fix: Set RUSTUP_TOOLCHAIN and invoke the proxies instead of directly …
Veykril Feb 14, 2024
1e6cef9
fix: Fix build scripts not being rebuilt in some occasions
Veykril Jan 4, 2024
004190b
Auto merge of #16563 - Veykril:fix-rustup-toolchain-bins, r=Veykril
bors Feb 14, 2024
3bb8d3a
Auto merge of #16247 - Veykril:opqueues, r=Veykril
bors Feb 14, 2024
e146139
Add support for `become` expr/tail calls
WaffleLapkin Jun 7, 2023
dba5997
Auto merge of #15003 - WaffleLapkin:become_unuwuable, r=Veykril
bors Feb 14, 2024
dda641c
Set documentation field in SCIP from doc comment
Wilfred Feb 13, 2024
0d6024c
Add tests for snippet range adjustment
DropDemBits Feb 15, 2024
7cf4a8a
fix: Place snippets correctly in multi-edit assists
DropDemBits Feb 15, 2024
8443305
Auto merge of #16559 - Wilfred:scip_documentation_field, r=lnicola
bors Feb 15, 2024
db277c7
Auto merge of #16569 - DropDemBits:structured-snippet-fix-adjust-snip…
bors Feb 15, 2024
1443d49
Remove salsa doc compile tests
Veykril Feb 15, 2024
b30b77d
Auto merge of #16573 - Veykril:salsa-doc-tests, r=Veykril
bors Feb 15, 2024
9ae0f92
fix "needless return" for trailing item declarations
davidsemakula Feb 15, 2024
b9b0d29
Auto merge of #16574 - davidsemakula:needless-return-fix, r=Veykril
bors Feb 15, 2024
fafb16b
lsp-server: add license files
michel-slm Feb 16, 2024
581d457
Add `add_placeholder_snippet_group`
DropDemBits Feb 16, 2024
115646d
Align `set_visibility` with the rest of the `set_` edit-in-place methods
DropDemBits Feb 16, 2024
eb6d6ba
Migrate `generate_trait_from_impl` to mutable ast
DropDemBits Feb 16, 2024
4af075d
Remove `SourceChangeBuilder::{insert,remove}_snippet`
DropDemBits Feb 16, 2024
e9efb56
Add dos line ending test
DropDemBits Feb 16, 2024
e4a3cc3
Add better snippet bits test
DropDemBits Feb 16, 2024
1aeec93
Only use `snippet_text_edit` to make snippet `SnippetTextEdit`s
DropDemBits Feb 16, 2024
1d8ed34
Escape snippet bits in-between placing snippets
DropDemBits Feb 16, 2024
e8457bb
Escape `{` and `}` as well
DropDemBits Feb 16, 2024
8a0a09a
Auto merge of #16577 - DropDemBits:structured-snippet-migrate-7, r=Ve…
bors Feb 16, 2024
5261fb2
Auto merge of #16576 - michel-slm:add-lsp-server-license, r=Veykril
bors Feb 16, 2024
c00c9ee
fix: Respect textual length of paths in find-path
Veykril Feb 16, 2024
a016555
Auto merge of #16582 - Veykril:find-path-length, r=Veykril
bors Feb 16, 2024
fd652ce
fix: Don't show type mismatches for `{unknown}` to non-`{unknown}` mi…
Veykril Feb 16, 2024
c864953
Auto merge of #16583 - Veykril:unknown-mismatch, r=Veykril
bors Feb 16, 2024
ed425f8
Bump actions/checkout to v4
lnicola Feb 16, 2024
8906661
Auto merge of #16585 - lnicola:bump-checkout, r=lnicola
bors Feb 16, 2024
b1404d3
fix: Split toolchain and datalayout out of CrateData
Veykril Feb 16, 2024
0ccb3b8
Move dedup-dev-deps tests into rust-analyzer crate
Veykril Feb 16, 2024
c8fd8a3
Update GitHub actions dependencies
LucasFA Feb 16, 2024
bb0f93a
Auto merge of #16587 - LucasFA:update-actions, r=lnicola
bors Feb 16, 2024
ead3691
CrateOrigin::Local means local to the project workspace, not cargo wo…
Veykril Feb 16, 2024
3e4deab
Add support for const and async trait bounds
compiler-errors Feb 16, 2024
25d1267
Auto merge of #16586 - Veykril:crate-graph-side-table, r=Veykril
bors Feb 16, 2024
36020bb
Update grammar
compiler-errors Feb 16, 2024
0932f89
Auto merge of #16588 - compiler-errors:async-and-const-bounds, r=Veykril
bors Feb 16, 2024
ac998a7
Auto merge of #16579 - DropDemBits:structured-snippet-fix-with-escape…
bors Feb 16, 2024
b72ae2c
Merge commit 'ac998a74b3c8ff4b81c3eeb9a18811d4cc76226d' into sync-fro…
lnicola Feb 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/tools/rust-analyzer/.github/rust.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"problemMatcher": [
{
"owner": "rustfmt",
"severity": "warning",
"pattern": [
{
"regexp": "^(Diff in (.+)) at line (\\d+):$",
"message": 1,
"file": 2,
"line": 3
}
]
},
{
"owner": "clippy",
"pattern": [
{
"regexp": "^(?:\\x1b\\[[\\d;]+m)*(warning|warn|error)(?:\\x1b\\[[\\d;]+m)*(\\[(.*)\\])?(?:\\x1b\\[[\\d;]+m)*:(?:\\x1b\\[[\\d;]+m)* ([^\\x1b]*)(?:\\x1b\\[[\\d;]+m)*$",
"severity": 1,
"message": 4,
"code": 3
},
{
"regexp": "^(?:\\x1b\\[[\\d;]+m)*\\s*(?:\\x1b\\[[\\d;]+m)*\\s*--> (?:\\x1b\\[[\\d;]+m)*(.*):(\\d*):(\\d*)(?:\\x1b\\[[\\d;]+m)*$",
"file": 1,
"line": 2,
"column": 3
}
]
}
]
}
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.github/workflows/autopublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
20 changes: 14 additions & 6 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
typescript: ${{ steps.filter.outputs.typescript }}
proc_macros: ${{ steps.filter.outputs.proc_macros }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dorny/paths-filter@1441771bbfdd59dcd748680ee64ebd8faab1a242
id: filter
with:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -65,6 +65,10 @@ jobs:
rustup update --no-self-update ${{ env.RUST_CHANNEL }}
rustup component add --toolchain ${{ env.RUST_CHANNEL }} rustfmt rust-src
rustup default ${{ env.RUST_CHANNEL }}
# https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json
- name: Install Rust Problem Matcher
if: matrix.os == 'ubuntu-latest'
run: echo "::add-matcher::.github/rust.json"

- name: Cache Dependencies
uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
Expand Down Expand Up @@ -107,6 +111,10 @@ jobs:
if: matrix.os == 'windows-latest'
run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr

- name: rustfmt
if: matrix.os == 'ubuntu-latest'
run: cargo fmt -- --check

# Weird targets to catch non-portable code
rust-cross:
if: github.repository == 'rust-lang/rust-analyzer'
Expand All @@ -121,7 +129,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
run: |
Expand Down Expand Up @@ -153,13 +161,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
if: needs.changes.outputs.typescript == 'true'

- name: Install Nodejs
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
if: needs.changes.outputs.typescript == 'true'

- name: Install xvfb
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
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 @@ -21,7 +21,7 @@ jobs:
rustup component add rustfmt rust-src
rustup default stable
- name: Cache cargo
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -36,10 +36,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Restore cargo cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -52,7 +52,7 @@ jobs:
run: cargo xtask metrics build

- name: Cache target
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: target/
key: ${{ runner.os }}-target-${{ github.sha }}
Expand All @@ -73,10 +73,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Restore cargo cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -86,7 +86,7 @@ jobs:
key: ${{ runner.os }}-cargo-${{ github.sha }}

- name: Restore target cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: target/
key: ${{ runner.os }}-target-${{ github.sha }}
Expand All @@ -106,7 +106,7 @@ jobs:
needs: [build_metrics, other_metrics]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download build metrics
uses: actions/download-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
14 changes: 7 additions & 7 deletions src/tools/rust-analyzer/.github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

Expand All @@ -78,9 +78,9 @@ jobs:
rustup component add rust-src

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Update apt repositories
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf'
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
run: apk add --no-cache git clang lld musl-dev nodejs npm

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

Expand Down Expand Up @@ -188,9 +188,9 @@ jobs:
needs: ["dist", "dist-x86_64-unknown-linux-musl"]
steps:
- name: Install Nodejs
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV
if: github.ref == 'refs/heads/release'
Expand All @@ -199,7 +199,7 @@ jobs:
- run: 'echo "TAG: $TAG"'

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.github/workflows/rustdoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
run: rustup update --no-self-update stable
Expand Down
17 changes: 9 additions & 8 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@ dependencies = [
"paths",
"proc-macro-api",
"proc-macro-test",
"ra-ap-rustc_lexer",
"span",
"stdx",
"tt",
Expand Down Expand Up @@ -1470,12 +1471,12 @@ dependencies = [

[[package]]
name = "ra-ap-rustc_index"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8a41dee58608b1fc93779ea365edaa70ac9927e3335ae914b675be0fa063cd7"
checksum = "df5a0ba0d08af366cf235dbe8eb7226cced7a4fe502c98aa434ccf416defd746"
dependencies = [
"arrayvec",
"ra-ap-rustc_index_macros 0.36.0",
"ra-ap-rustc_index_macros 0.37.0",
"smallvec",
]

Expand All @@ -1493,9 +1494,9 @@ dependencies = [

[[package]]
name = "ra-ap-rustc_index_macros"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbfe98def54c4337a2f7d8233850bd5d5349972b185fe8a0db2b979164b30ed8"
checksum = "1971ebf9a701e0e68387c264a32517dcb4861ad3a4862f2e2803c1121ade20d5"
dependencies = [
"proc-macro2",
"quote",
Expand Down Expand Up @@ -1525,11 +1526,11 @@ dependencies = [

[[package]]
name = "ra-ap-rustc_pattern_analysis"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5529bffec7530b4a3425640bfdfd9b95d87c4c620f740266c0de6572561aab4"
checksum = "2c3c0e7ca9c5bdc66e3b590688e237a22ac47a48e4eac7f46b05b2abbfaf0abd"
dependencies = [
"ra-ap-rustc_index 0.36.0",
"ra-ap-rustc_index 0.37.0",
"rustc-hash",
"rustc_apfloat",
"smallvec",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ra-ap-rustc_lexer = { version = "0.35.0", default-features = false }
ra-ap-rustc_parse_format = { version = "0.35.0", default-features = false }
ra-ap-rustc_index = { version = "0.35.0", default-features = false }
ra-ap-rustc_abi = { version = "0.35.0", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.36.0", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.37.0", default-features = false }

# local crates that aren't published to crates.io. These should not have versions.
sourcegen = { path = "./crates/sourcegen" }
Expand Down
Loading