Skip to content
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

Subtree update of rust-analyzer #120636

Merged
merged 93 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
e15f40e
feat: add conflict ext (panicbit.cargo) detect
Young-Flash Jan 22, 2024
56f54c8
fix lint and fmt
Young-Flash Jan 22, 2024
85d56ee
Fix copy/paste error.
nnethercote Jan 24, 2024
5651407
Rework `CStrUnit`.
nnethercote Jan 23, 2024
858f4ac
Rename the unescaping functions.
nnethercote Jan 24, 2024
96ebad0
minor: update conflict extension detect logic
Young-Flash Jan 26, 2024
da798bc
make `ast::UseTree::wrap_in_tree_list` more robust
davidsemakula Jan 20, 2024
57934ac
Add postfix completion for let else
Alainx277 Oct 8, 2023
51d57b9
Make return a snippet
Alainx277 Oct 9, 2023
7ec32d0
Remove letelse control flow snippets
Alainx277 Jan 27, 2024
b22e772
feat: Support for GOTO def from *inside* files included with include!…
wasd96040501 Jan 27, 2024
8fab92f
normalize use trees when merging imports
davidsemakula Jan 20, 2024
81d713e
remove ordered insert logic from recursive merge function
davidsemakula Jan 20, 2024
a8a18f3
add normalize import assist
davidsemakula Jan 20, 2024
b241593
merge imports assist always applies to covering use item except for n…
davidsemakula Jan 21, 2024
fc00602
merge imports assist avoids adding unnecessary braces when merging ne…
davidsemakula Jan 21, 2024
84e1314
add more tests for normalize import assist
davidsemakula Jan 22, 2024
6f303f4
feat: enable excluding refs search results in test
Young-Flash Jan 28, 2024
1bd21e9
test: add test for excluding refs
Young-Flash Jan 28, 2024
f43cea0
Merge commit '7219414e81810fd4d967136c4a0650523892c157' into sync-fro…
lnicola Jan 28, 2024
6181102
fix: use Semantics to judge whether a func is marked as #[test]
Young-Flash Jan 29, 2024
2b71aca
test: add full path ref exclude test case
Young-Flash Jan 29, 2024
d13951f
Auto merge of #15730 - Alainx277:let-else-postfix, r=Veykril
bors Jan 29, 2024
20c0167
Bump scip
lnicola Jan 30, 2024
5860763
Cleanup error variants in MIR code slightly
Veykril Jan 30, 2024
22b6f96
Auto merge of #16439 - wasd96040501:feat/gotodef3, r=Veykril
bors Jan 30, 2024
11b401d
Auto merge of #16447 - Veykril:mir-errors, r=Veykril
bors Jan 30, 2024
4facb62
minor: update warning msg
Young-Flash Jan 30, 2024
dba3fc4
style: remove unnecessary macro
davidsemakula Jan 30, 2024
db9fd37
minor: correct typos
Young-Flash Jan 30, 2024
75a42f1
collapsible_if
Urhengulas Jan 21, 2024
73c7c72
CI: add clippy
Urhengulas Jan 21, 2024
628f701
CI: Don't deny clippy warnings
Urhengulas Jan 30, 2024
43b1ae0
`cargo clippy --fix`
Urhengulas Jan 30, 2024
da4d5f8
Auto merge of #16413 - Urhengulas:clippy-ci, r=Veykril
bors Jan 30, 2024
63123ab
Auto merge of #16417 - davidsemakula:normalize-use-trees, r=Veykril
bors Jan 30, 2024
e1ea7c8
internal: switch to `tracing` from `log`
davidbarsky Jan 18, 2024
d923d62
Auto merge of #16394 - davidbarsky:david/add-more-tracing-spans, r=Ve…
bors Jan 30, 2024
17d2e8d
internal: remove `tracing/mod.rs`
davidbarsky Jan 30, 2024
8f1a253
internal: Undo special bracket classification for attributes in vscod…
Veykril Jan 30, 2024
9a832c4
Auto merge of #16453 - Veykril:brackets, r=Veykril
bors Jan 30, 2024
e4146af
Auto merge of #16441 - Young-Flash:exclude_tests_refs, r=Veykril
bors Jan 31, 2024
604479c
internal: Use improved adjusted_display_range for all diagnostics
Veykril Jan 31, 2024
e48bc04
Auto merge of #16459 - Veykril:diagnostics, r=Veykril
bors Jan 31, 2024
d252247
internal: Remove unnecessary usages of ExpansionInfo
Veykril Jan 31, 2024
2661c27
Auto merge of #16461 - Veykril:expansion-info, r=Veykril
bors Jan 31, 2024
9d837a6
Auto merge of #16445 - lnicola:bump-scip, r=lnicola
bors Jan 31, 2024
62ff8f3
minor: correct `close` to `closure`
Young-Flash Jan 31, 2024
355c944
Auto merge of #16448 - Young-Flash:typos, r=lnicola
bors Jan 31, 2024
251b14f
internal: don't panic in `debug_pat`
davidbarsky Jan 30, 2024
579e98c
internal: record Event kind in `handle_event`
davidbarsky Jan 30, 2024
386d438
skip_while_next
Urhengulas Jan 21, 2024
daa2072
toplevel_ref_arg
Urhengulas Jan 22, 2024
de6f956
unnecessary_cast
Urhengulas Jan 22, 2024
f15ee8a
unnecessary_filter_map
Urhengulas Jan 22, 2024
c4302ea
unnecessary_lazy_evaluations
Urhengulas Jan 22, 2024
f191b80
Refactor
Urhengulas Jan 22, 2024
e7d0dea
unnecessary_mut_passed
Urhengulas Jan 22, 2024
b73ee2f
useless_conversion
Urhengulas Jan 22, 2024
b176cf2
useless_format
Urhengulas Jan 22, 2024
0adb4d1
wildcard_in_or_patterns
Urhengulas Jan 22, 2024
c468834
derivable_impls
Urhengulas Jan 22, 2024
dd9f27b
borrow_deref_ref
Urhengulas Jan 22, 2024
04ccef8
field_reassign_with_default
Urhengulas Jan 22, 2024
e7e09e7
large_enum_variant
Urhengulas Jan 22, 2024
d37f4e0
new_without_default
Urhengulas Jan 30, 2024
771c6c9
format_collect
Urhengulas Jan 30, 2024
df2c7a6
`cargo clippy --fix`
Urhengulas Jan 31, 2024
44494e2
internal: teach hprof to record `tracing` fields
davidbarsky Jan 30, 2024
0396811
Auto merge of #16456 - davidbarsky:david/tracing-followups, r=Veykril
bors Jan 31, 2024
a1fdb87
Remove `abi_amdgpu_kernel` references
clubby789 Jan 31, 2024
1ab1a25
Auto merge of #16463 - clubby789:remove-abi_amdgpu_kernel, r=lnicola
bors Jan 31, 2024
23f4b7f
Remove stdx::eprintln overwrite
Veykril Jan 31, 2024
42cb1a2
Auto merge of #16465 - Veykril:eprintln, r=Veykril
bors Jan 31, 2024
671c776
minor: Recommend maintained Neovim plugin in documentation
ThomasFrans Feb 1, 2024
3afa6b1
Auto merge of #16468 - ThomasFrans:docs-update-plugin-url, r=lnicola
bors Feb 1, 2024
135a8d9
Auto merge of #16416 - Young-Flash:cargo_ext_detect, r=lnicola
bors Feb 1, 2024
36cb518
internal: add typos.toml as typo white list
Young-Flash Feb 1, 2024
b0be296
internal: add typos CI check
Young-Flash Feb 1, 2024
850ba2f
Auto merge of #16451 - Urhengulas:satisfy-clippy, r=Veykril
bors Feb 1, 2024
8ba31cc
Merge remote-tracking branch 'upstream/release' into sync-from-rust
lnicola Feb 2, 2024
4f09335
Merge remote-tracking branch 'upstream/master' into sync-from-rust
lnicola Feb 2, 2024
ef07b05
Bump rustc_lexer and rustc_parse_format
lnicola Feb 2, 2024
7a0b887
Bump rustc_index and rustc_abi
lnicola Feb 2, 2024
980d348
Auto merge of #16476 - lnicola:sync-from-rust, r=lnicola
bors Feb 2, 2024
ba2910a
minor: correct some typos
Young-Flash Feb 2, 2024
70d6141
internal: update .typos.tmol
Young-Flash Feb 2, 2024
a52a4d9
internal: update typo-check CI setting
Young-Flash Feb 2, 2024
8f6a728
Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
bors Feb 2, 2024
a605b96
Bump release runners to MacOS 12
lnicola Feb 3, 2024
0113bc9
Auto merge of #16479 - lnicola:macos-12, r=lnicola
bors Feb 3, 2024
468f400
Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-fro…
lnicola Feb 4, 2024
98ad126
Try to fix in-tree build
lnicola Feb 4, 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
24 changes: 21 additions & 3 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Switch to stable toolchain
run: |
rustup update --no-self-update stable
rustup component add --toolchain stable rust-src
rustup component add --toolchain stable rust-src clippy
rustup default stable

- name: Run analysis-stats on rust-analyzer
Expand All @@ -103,6 +103,10 @@ jobs:
RUSTC_BOOTSTRAP: 1
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std

- name: clippy
if: matrix.os == 'ubuntu-latest'
run: cargo clippy --all-targets

# Weird targets to catch non-portable code
rust-cross:
if: github.repository == 'rust-lang/rust-analyzer'
Expand Down Expand Up @@ -203,11 +207,25 @@ jobs:
working-directory: ./editors/code
if: needs.changes.outputs.typescript == 'true'

typo-check:
name: Typo Check
runs-on: ubuntu-latest
timeout-minutes: 10
env:
FORCE_COLOR: 1
TYPOS_VERSION: v1.18.0
steps:
- name: download typos
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

- name: check for typos
run: typos

end-success:
name: bors build finished
if: github.event.pusher.name == 'bors' && success()
runs-on: ubuntu-latest
needs: [rust, rust-cross, typescript]
needs: [rust, rust-cross, typescript, typo-check]
steps:
- name: Mark the job as successful
run: exit 0
Expand All @@ -216,7 +234,7 @@ jobs:
name: bors build finished
if: github.event.pusher.name == 'bors' && !success()
runs-on: ubuntu-latest
needs: [rust, rust-cross, typescript]
needs: [rust, rust-cross, typescript, typo-check]
steps:
- name: Mark the job as a failure
run: exit 1
4 changes: 2 additions & 2 deletions src/tools/rust-analyzer/.github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
- os: ubuntu-20.04
target: arm-unknown-linux-gnueabihf
code-target: linux-armhf
- os: macos-11
- os: macos-12
target: x86_64-apple-darwin
code-target: darwin-x64
- os: macos-11
- os: macos-12
target: aarch64-apple-darwin
code-target: darwin-arm64

Expand Down
31 changes: 31 additions & 0 deletions src/tools/rust-analyzer/.typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[default.extend-identifiers]
AnserStyle = "AnserStyle"
datas = "datas"
impl_froms = "impl_froms"
selfs = "selfs"

[default.extend-words]
anser = "anser"
ba = "ba"
fo = "fo"
ket = "ket"
makro = "makro"
raison = "raison"
trivias = "trivias"
TOOD = "TOOD"

[default]
extend-ignore-re = [
# ignore string which contains $x (x is a num), which use widely in test
".*\\$\\d.*",
# ignore generated content like `boxed....nner()`, `Defaul...efault`
"\\w*\\.{3,4}\\w*",
]

[files]
extend-exclude = [
"*.json",
"*.rast",
"crates/parser/test_data/lexer/err/*",
"bench_data/*",
]
75 changes: 53 additions & 22 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"

[[package]]
name = "always-assert"
version = "0.1.3"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127"
checksum = "a1078fa1ce1e34b1872d8611ad921196d76bdd7027e949fbe31231abde201892"
dependencies = [
"log",
"tracing",
]

[[package]]
Expand Down Expand Up @@ -78,6 +78,7 @@ dependencies = [
"span",
"stdx",
"syntax",
"tracing",
"triomphe",
"vfs",
]
Expand Down Expand Up @@ -494,8 +495,10 @@ dependencies = [
"profile",
"rustc-hash",
"smallvec",
"span",
"stdx",
"syntax",
"tracing",
"triomphe",
"tt",
]
Expand Down Expand Up @@ -592,7 +595,7 @@ dependencies = [
"profile",
"project-model",
"ra-ap-rustc_abi",
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.35.0",
"ra-ap-rustc_pattern_analysis",
"rustc-hash",
"scoped-tls",
Expand Down Expand Up @@ -670,6 +673,7 @@ dependencies = [
"test-fixture",
"test-utils",
"text-edit",
"tracing",
]

[[package]]
Expand All @@ -690,6 +694,7 @@ dependencies = [
"test-fixture",
"test-utils",
"text-edit",
"tracing",
]

[[package]]
Expand Down Expand Up @@ -747,6 +752,7 @@ dependencies = [
"test-fixture",
"test-utils",
"text-edit",
"tracing",
]

[[package]]
Expand Down Expand Up @@ -1342,6 +1348,7 @@ dependencies = [
"once_cell",
"perf-event",
"tikv-jemalloc-ctl",
"tracing",
"winapi",
]

Expand Down Expand Up @@ -1419,12 +1426,12 @@ dependencies = [

[[package]]
name = "ra-ap-rustc_abi"
version = "0.33.0"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce9100fc66c6c60aeeb076868ead9c2eaa65d6a5a90404f08c242327a92ff4b"
checksum = "3c0baa423a2c2bfd6e4bd40e7215f7ddebd12a649ce0b65078a38b91068895aa"
dependencies = [
"bitflags 2.4.1",
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.35.0",
"tracing",
]

Expand All @@ -1435,7 +1442,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e5313d7f243b63ef9e58d94355b11aa8499f1328055f1f58adf0a5ea7d2faca"
dependencies = [
"arrayvec",
"ra-ap-rustc_index_macros",
"ra-ap-rustc_index_macros 0.33.0",
"smallvec",
]

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

Expand All @@ -1451,23 +1469,35 @@ dependencies = [
"synstructure",
]

[[package]]
name = "ra-ap-rustc_index_macros"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "054e25eac52f0506c1309ca4317c11ad4925d7b99eb897f71aa7c3cbafb46c2b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.39",
"synstructure",
]

[[package]]
name = "ra-ap-rustc_lexer"
version = "0.33.0"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2d221356e5717595e8a0afa5fba1620dcb4032ab784dc4d98fdc7284e3feb66"
checksum = "c8da0fa51a1a97ba4296a1c78fa454815a153b472e2546b6338a0902ad59e015"
dependencies = [
"unicode-properties",
"unicode-xid",
]

[[package]]
name = "ra-ap-rustc_parse_format"
version = "0.33.0"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab62fc925612374103b4f178da347b535b35d9eb1ff5ba42105c990b2e25a164"
checksum = "3851f930a54adcb76889983dcd5c00a0c4e206e190e1384dbc00d49b82dfb45e"
dependencies = [
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.35.0",
"ra-ap-rustc_lexer",
]

Expand All @@ -1478,7 +1508,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c4085e0c771fd4b883930b599ef42966b855762bbe4052c17673b3253421a6d"
dependencies = [
"derivative",
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.33.0",
"rustc-hash",
"rustc_apfloat",
"smallvec",
Expand Down Expand Up @@ -1581,7 +1611,6 @@ dependencies = [
"tikv-jemallocator",
"toolchain",
"tracing",
"tracing-log",
"tracing-subscriber",
"tracing-tree",
"triomphe",
Expand All @@ -1595,26 +1624,26 @@ dependencies = [

[[package]]
name = "rust-analyzer-salsa"
version = "0.17.0-pre.5"
version = "0.17.0-pre.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca9d387a9801f4fb9b366789ad1bfc08448cafc49cf148d907cfcd88ab665d7f"
checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d"
dependencies = [
"indexmap",
"lock_api",
"log",
"oorandom",
"parking_lot",
"rust-analyzer-salsa-macros",
"rustc-hash",
"smallvec",
"tracing",
"triomphe",
]

[[package]]
name = "rust-analyzer-salsa-macros"
version = "0.17.0-pre.5"
version = "0.17.0-pre.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2035f385d7fae31e9b086f40b272ee1d79c484472f31c9a10348a406e841eaf"
checksum = "4d96498e9684848c6676c399032ebc37c52da95ecbefa83d71ccc53b9f8a4a8e"
dependencies = [
"heck",
"proc-macro2",
Expand Down Expand Up @@ -1661,9 +1690,9 @@ dependencies = [

[[package]]
name = "scip"
version = "0.3.1"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e84d21062a3ba08d58870c8c36b0c005b2b2261c6ad1bf7042585427c781883"
checksum = "e5dc1bd66649133af84ab62436ddd2856c2605182b02dec2cd197f684dfe15ef"
dependencies = [
"protobuf",
]
Expand Down Expand Up @@ -1863,6 +1892,7 @@ dependencies = [
"stdx",
"test-utils",
"text-edit",
"tracing",
"triomphe",
"ungrammar",
]
Expand Down Expand Up @@ -1890,6 +1920,7 @@ dependencies = [
"rustc-hash",
"stdx",
"text-size",
"tracing",
]

[[package]]
Expand Down
31 changes: 8 additions & 23 deletions src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ tt = { path = "./crates/tt", version = "0.0.0" }
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }

ra-ap-rustc_lexer = { version = "0.33.0", default-features = false }
ra-ap-rustc_parse_format = { version = "0.33.0", default-features = false }
ra-ap-rustc_index = { version = "0.33.0", default-features = false }
ra-ap-rustc_abi = { version = "0.33.0", default-features = false }
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.33.0", default-features = false }

# local crates that aren't published to crates.io. These should not have versions.
Expand Down Expand Up @@ -113,7 +113,7 @@ itertools = "0.12.0"
libc = "0.2.150"
nohash-hasher = "0.2.0"
rayon = "1.8.0"
rust-analyzer-salsa = "0.17.0-pre.5"
rust-analyzer-salsa = "0.17.0-pre.6"
rustc-hash = "1.1.0"
semver = "1.0.14"
serde = { version = "1.0.192", features = ["derive"] }
Expand All @@ -128,9 +128,9 @@ text-size = "1.1.1"
tracing = "0.1.40"
tracing-tree = "0.3.0"
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
"registry",
"fmt",
"tracing-log",
"registry",
"fmt",
"tracing-log",
] }
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
xshell = "0.2.5"
Expand Down Expand Up @@ -167,29 +167,14 @@ new_ret_no_self = "allow"

## Following lints should be tackled at some point
borrowed_box = "allow"
borrow_deref_ref = "allow"
derivable_impls = "allow"
derived_hash_with_manual_eq = "allow"
field_reassign_with_default = "allow"
forget_non_drop = "allow"
format_collect = "allow"
large_enum_variant = "allow"
needless_doctest_main = "allow"
new_without_default = "allow"
non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow"
self_named_constructors = "allow"
skip_while_next = "allow"
too_many_arguments = "allow"
toplevel_ref_arg = "allow"
type_complexity = "allow"
unnecessary_cast = "allow"
unnecessary_filter_map = "allow"
unnecessary_lazy_evaluations = "allow"
unnecessary_mut_passed = "allow"
useless_conversion = "allow"
useless_format = "allow"
wildcard_in_or_patterns = "allow"
wrong_self_convention = "allow"

## warn at following lints
Expand Down
Loading
Loading