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 #116847

Closed
wants to merge 195 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
940d87b
extend check.overrideCommand and buildScripts.overrideCommand docs re…
RalfJung Aug 21, 2023
2de62be
projects/workspaces
RalfJung Aug 21, 2023
23ffda1
full function signatures option
vxpm Sep 4, 2023
6afa5b0
better handling of spaces & newlines
vxpm Sep 4, 2023
6b487ed
fix & run tests
vxpm Sep 4, 2023
d7a8e80
feat: initial version of bool_to_enum assist
rmehri01 Aug 19, 2023
59738d5
fix: add generated doctest
rmehri01 Aug 19, 2023
83196fd
fix: remove trailing whitespace
rmehri01 Aug 19, 2023
91ac1d6
fix: initializing struct multiple times
Sep 8, 2023
455dacf
fix: only trigger assist on Name
Sep 8, 2023
136a9db
style: rename some locals
Sep 8, 2023
2e13aed
feat: support cross module imports
rmehri01 Sep 9, 2023
7ba2e13
fix: add checks for overwriting incorrect ancestor
rmehri01 Sep 10, 2023
5683df2
Deunwrap inline call
alibektas Aug 9, 2023
68d24b6
Deunwrap inline call v2
alibektas Sep 9, 2023
38491fc
v3
alibektas Sep 10, 2023
9c62571
Deunwrap convert_comment_block
alibektas Aug 9, 2023
b316bcc
replace for loops with sth more idiomatic
alibektas Aug 9, 2023
a66dbd1
v2
alibektas Aug 15, 2023
2fdf7e4
v3
alibektas Sep 10, 2023
25b1b3e
feat: add support for other ADT types and destructuring patterns
rmehri01 Sep 11, 2023
0863024
Make assist lazy again
alibektas Sep 11, 2023
893e191
Make assist lazy again
alibektas Sep 11, 2023
145a101
Deunwrap add_missing_match_arms
alibektas Sep 11, 2023
d794865
remove `as _` on auto importing on trait that is aliased with `_`
dfireBird Jul 22, 2023
df1239b
add tests for insert use with renamed imports
dfireBird Sep 11, 2023
2974416
fix: ensure `rustfmt` runs when configured with `./`
davidbarsky Sep 12, 2023
ebbbaaa
refactor: fix clippy lints
shogo-nakano-desu Sep 15, 2023
0bb2298
refactor: remove TODO with no explanation
shogo-nakano-desu Sep 15, 2023
96c3332
refactor: fix clippy lint
shogo-nakano-desu Sep 15, 2023
f4704bc
Switch to in-tree rustc dependencies with a cfg flag
HKalbasi Sep 15, 2023
24b6922
triagebot exclude_labels -> exclude_titles
pitaj Sep 16, 2023
cac796a
Give `unmerge_use` a label explaining what it will affect.
kpreid Sep 16, 2023
c372431
scip: Use load_workspace_at.
emilio Sep 19, 2023
cdaadb6
Auto merge of #15632 - emilio:scip-build-rs, r=lnicola
bors Sep 19, 2023
22b18b9
Auto merge of #15616 - HKalbasi:rustc-deps, r=HKalbasi
bors Sep 19, 2023
1841192
Do not resolve inlayHint.textEdit for VSCode client
SomeoneToIgnore Sep 19, 2023
f9fac02
Use proper editor name
SomeoneToIgnore Sep 19, 2023
0427a23
Auto merge of #15635 - SomeoneToIgnore:fix-vscode-edits, r=Veykril
bors Sep 19, 2023
3a63255
Update chalk version
Wilfred Sep 19, 2023
4b3257a
refactor: port anymap
shogo-nakano-desu Sep 16, 2023
00e238e
refactor: remove unnecesary cfg_attr and inline macro
shogo-nakano-desu Sep 19, 2023
f671b0b
refactor: move implementation inside anymap crate into stdx crate
shogo-nakano-desu Sep 19, 2023
6212182
refactor: remove hashbrown deps since we can use std
shogo-nakano-desu Sep 19, 2023
2b891ca
chore: add comments to mention anymap is a port from another repo
shogo-nakano-desu Sep 20, 2023
4778255
Auto merge of #15637 - Wilfred:update_chalk, r=lnicola
bors Sep 20, 2023
1e11a55
refactor: remove unnecesary deps that are blended in when rebase
shogo-nakano-desu Sep 20, 2023
dd84306
refactor: remove boxing
shogo-nakano-desu Sep 20, 2023
d6fef2c
Auto merge of #15621 - kpreid:import, r=Veykril
bors Sep 20, 2023
91b012f
Documentation: Add parenthesis to the list of on-typing assists.
tomalexander Sep 21, 2023
60f7473
fix parens when inlining closure local variables
rmehri01 Sep 22, 2023
ea11846
fix parens when inlining closure in body of function
rmehri01 Sep 22, 2023
c22bb03
Auto merge of #15651 - rmehri01:15639_fix_inline_local_closure, r=lni…
bors Sep 22, 2023
fccae08
Auto merge of #15649 - tomalexander:master, r=Veykril
bors Sep 22, 2023
11ffcc0
Auto merge of #15615 - shogo-nakano-desu:refactor/fix-clippy-lints, r…
bors Sep 22, 2023
93562dd
Use parent + and_then instead of ancestors
Veykril Sep 22, 2023
2ededa2
Auto merge of #15432 - alibektas:deunwrap/inline_call, r=Veykril
bors Sep 22, 2023
df75809
Auto merge of #15484 - rmehri01:14779_bool_to_enum_assist, r=Veykril
bors Sep 22, 2023
5855bd8
Auto merge of #15587 - dfireBird:fix-15128, r=Veykril
bors Sep 22, 2023
609bdbc
Auto merge of #15620 - pitaj:no-merges_exclude-titles, r=Veykril
bors Sep 22, 2023
556f0c6
Various small fixes
Veykril Sep 22, 2023
8ad536f
Make path start with a QualifiedPathType
alibektas Sep 15, 2023
695a134
Fix doctest
alibektas Sep 20, 2023
4a8622c
Auto merge of #15652 - Veykril:format_to, r=lnicola
bors Sep 22, 2023
0a91a54
v4
alibektas Sep 22, 2023
622e1a8
Add a test case to `add_missing_match_arms`
alibektas Sep 22, 2023
132a6ce
Omit QualPathTy when possible
alibektas Sep 22, 2023
59bcbaf
Auto merge of #15594 - alibektas:deunwrap/add_missing_match_arms, r=V…
bors Sep 22, 2023
ba7f2bf
Update config docs
Veykril Sep 22, 2023
8139e8e
Auto merge of #15425 - alibektas:deunwrap/convert_comment_block, r=Ve…
bors Sep 22, 2023
2b580a1
Auto merge of #15492 - RalfJung:invocation, r=Veykril
bors Sep 22, 2023
fc258de
Make QualPathTy case readable
alibektas Sep 22, 2023
9f3d627
add tests for full signatures
vxpm Sep 23, 2023
10fae62
split detail function
vxpm Sep 23, 2023
e5e937a
Auto merge of #15582 - vxpm:master, r=HKalbasi
bors Sep 24, 2023
7834b8f
Add `unused_variables` native diagnostic
HKalbasi Sep 24, 2023
ab52ba2
Fix unused_variables in tests
HKalbasi Sep 24, 2023
588c7d9
minor: hover_simple refactor
DaniPopes Sep 24, 2023
862a300
Auto merge of #15660 - DaniPopes:hover-simple-refactor, r=HKalbasi
bors Sep 24, 2023
7306504
fix panic with wrapping/unwrapping result return type assists
rmehri01 Sep 24, 2023
963ba59
minor: update libc to 0.2.148
chenx97 Sep 25, 2023
972a19f
Auto merge of #15659 - HKalbasi:unused-var, r=HKalbasi
bors Sep 25, 2023
f64eecd
fix one
Milo123459 Sep 25, 2023
85ead6e
remove other unwraps
Milo123459 Sep 25, 2023
d3cc3bc
Auto merge of #15665 - Milo123459:milo/remove-unwraps, r=lnicola
bors Sep 25, 2023
bce4be9
fix: make bool_to_enum assist create enum at top-level
rmehri01 Sep 26, 2023
73150c3
fix: wrap method call exprs in parens
rmehri01 Sep 26, 2023
6ca48d9
feat: add backtick to surrounding and auto-closing pairs
connorskees Sep 26, 2023
0dbde71
Simplify
Veykril Sep 26, 2023
b0fe99f
Auto merge of #15669 - Veykril:simplify, r=Veykril
bors Sep 26, 2023
c945f90
Auto merge of #15663 - chenx97:libc-148, r=Veykril
bors Sep 26, 2023
3b1b58c
Auto merge of #15662 - rmehri01:fix_panic_with_return_in_match, r=Vey…
bors Sep 26, 2023
6c907e1
Improve useRustcErrorCode description
veber-alex Sep 26, 2023
5b04a7d
Update editors/code/package.json
veber-alex Sep 27, 2023
f93b6ac
Auto merge of #15672 - veber-alex:useRustcErrorCode_descriptio, r=lni…
bors Sep 27, 2023
2b9dde1
Allocate ast ids for parameters
Veykril Sep 28, 2023
b3f4574
Auto merge of #15677 - Veykril:param-ast-id, r=Veykril
bors Sep 28, 2023
791e6c8
scip: Allow customizing cargo config.
emilio Sep 19, 2023
f19479a
Auto merge of #15633 - emilio:scip-cargo-config, r=lnicola
bors Sep 28, 2023
1b3e5b2
style: simplify node_to_insert_before
rmehri01 Sep 28, 2023
87e2c31
Auto merge of #15667 - rmehri01:bool_to_enum_top_level, r=Veykril
bors Sep 29, 2023
a382e64
Recover better on missing parameter in param list
Veykril Sep 29, 2023
50678e0
Auto merge of #15682 - Veykril:param-list-recov, r=Veykril
bors Sep 29, 2023
dfeff9f
Only run tests on linux in pull requests
Veykril Sep 29, 2023
1752178
Auto merge of #15686 - Veykril:param-list-recov, r=Veykril
bors Sep 29, 2023
53f5c1c
internal: re-generate lints.rs
DaniPopes Sep 29, 2023
e478db7
Auto merge of #15680 - DaniPopes:regenerate-lints, r=Veykril
bors Sep 29, 2023
a943b19
Make rustc_layout_scalar_valid_range attributes work for non-decimal …
Veykril Sep 29, 2023
547bcf8
Auto merge of #15688 - Veykril:rustc_layout_scalar_valid_range, r=Vey…
bors Sep 29, 2023
dd8ea97
vscode: Fix line and col regexp for problem matcher
Enselic Sep 29, 2023
ae5d74d
typing underscore should not trigger completions in types or patterns
Veykril Sep 29, 2023
4791a5d
Auto merge of #15692 - Veykril:underscore-completions, r=Veykril
bors Sep 29, 2023
af28458
Downgrade `unused_variables` to experimental
HKalbasi Sep 30, 2023
0840038
Auto merge of #15693 - HKalbasi:unused-var, r=HKalbasi
bors Sep 30, 2023
40f80e2
move `to_camel_case` and `char_has_case` from case_conv to stdx
rmehri01 Sep 30, 2023
2611fbf
implement basic version of convert_tuple_return_type_to_struct assist
rmehri01 Oct 1, 2023
146a7cc
fix: allow more kinds of if let patterns in guarded return assist
rmehri01 Oct 1, 2023
34d3490
feat: add assist for applying De Morgan's law to iterators
rmehri01 Oct 2, 2023
084ee93
Strip base prefix in layout_scalar_valid_range
lnicola Oct 2, 2023
d7faec8
Auto merge of #15701 - lnicola:rustc_layout_scalar_valid_range2, r=ln…
bors Oct 2, 2023
4c9d2c7
Auto merge of #15698 - rmehri01:15695_make_guarded_return_more_lenien…
bors Oct 2, 2023
7c113ee
Add mock description to rustc-dependencies
lnicola Oct 3, 2023
7b8330f
Auto merge of #15706 - lnicola:rustc-dependencies-description, r=lnicola
bors Oct 3, 2023
a8ec77d
address PR feedback.
davidbarsky Oct 3, 2023
fe39816
Recognize custom main function as binary entrypoint for runnables
Veykril Oct 4, 2023
36be913
Auto merge of #15709 - Veykril:runnables-custom-main, r=Veykril
bors Oct 4, 2023
c266387
Replace unwrap with expect
Veykril Oct 4, 2023
7e9da40
Auto merge of #15700 - rmehri01:15694_iterator_demorgan, r=Veykril
bors Oct 4, 2023
ad73597
Auto merge of #15690 - Enselic:fix-regexp, r=Veykril
bors Oct 4, 2023
9ba8dbc
style: clean up magic number for finding pattern usages
rmehri01 Oct 4, 2023
ab091b7
Add config for the default click action of extension status bar
dfireBird Oct 4, 2023
b57658d
Auto merge of #15707 - dfireBird:default-statusbar-action-config, r=l…
bors Oct 4, 2023
695c612
Auto merge of #15641 - alibektas:15598/fix_into_to_from, r=Veykril
bors Oct 5, 2023
4af730e
Do flyimport completions by prefix search for short paths
Veykril Oct 5, 2023
58239f2
Remove repetitive words
cuishuang Oct 5, 2023
e7295ff
Prepare for rust-bors
lnicola Oct 5, 2023
54866a0
Auto merge of #15668 - connorskees:feat/close-backtick, r=Veykril
bors Oct 5, 2023
fd39a30
Auto merge of #15712 - cuishuang:master, r=lnicola
bors Oct 5, 2023
03c5603
Auto merge of #15714 - lnicola:rust-bors, r=lnicola
bors Oct 5, 2023
114f8a0
Fix typos exec_intrinsic
Toby222 Oct 6, 2023
a158670
Auto merge of #15718 - Toby222:master, r=lnicola
bors Oct 6, 2023
88a00bf
Shrink PatPtr by swapping its AstPtr and Either wrap order
Veykril Oct 6, 2023
ef58843
Auto merge of #15721 - Veykril:shrink-pat-ptr, r=Veykril
bors Oct 6, 2023
b3ebc9a
Check for both path separators on windows
Veykril Oct 6, 2023
b1f89a8
Auto merge of #15600 - davidbarsky:davidbarsky/broken-rustfmt-in-ra, …
bors Oct 6, 2023
c5d9bfa
internal: fix automatic rustc/rustdoc lint generation
DaniPopes Oct 7, 2023
3dfc1bf
Use vscode.env.openExternal instead of the vscode.open command for docs
EliasHolzmann Oct 8, 2023
7e9b25b
Auto merge of #15725 - DaniPopes:fix-lintgen, r=Veykril
bors Oct 9, 2023
aeef7b6
Add config option to use `rust-analyzer` specific target dir
Tyrubias Sep 29, 2023
53b6700
Add dedicated `target_dir` field to `CargoConfig` and `FlycheckConfig`
Tyrubias Oct 1, 2023
ef0b3bb
Clarify documentation on new parameter
Tyrubias Oct 1, 2023
3682c37
Set `CARGO_TARGET_DIR` when using Flycheck custom command
Tyrubias Oct 1, 2023
2290cc3
Pass target directory as flag instead of env variable
Tyrubias Oct 4, 2023
9771e1e
Don't pass any target directory options to custom flycheck
Tyrubias Oct 9, 2023
a39d207
Addressed PR style comments
Tyrubias Oct 9, 2023
d646ae8
Auto merge of #15681 - Tyrubias:custom_target_dir, r=Veykril
bors Oct 9, 2023
dca63d1
Auto merge of #15713 - Veykril:flyimport-completions-short, r=Veykril
bors Oct 9, 2023
ab62c01
Auto merge of #15696 - rmehri01:14293_tuple_return_type_to_struct, r=…
bors Oct 9, 2023
aaa1e8e
Auto merge of #15618 - shogo-nakano-desu:internal/port-anymap, r=Veykril
bors Oct 9, 2023
e8372e0
vscode: Support opening local documentation if available
EliasHolzmann Oct 8, 2023
8a23314
Auto merge of #15728 - EliasHolzmann:feature/local_documentation_vsco…
bors Oct 10, 2023
a7fada4
add replace_is_some_with_if_let_some assist
Young-Flash Oct 11, 2023
1fe6ac8
add diagnosis messages for chars and byte literal errors
pvalletbo Oct 11, 2023
f58a825
fix: cargo fmt
pvalletbo Oct 11, 2023
c387361
Auto merge of #15744 - pvalletbo:15395/character-byte-literals-diagno…
bors Oct 11, 2023
677e6f3
fix: use unescape_byte function for Byte literals
pvalletbo Oct 11, 2023
e1aeb7f
fix: handle errors for string byte string and c_string
pvalletbo Oct 11, 2023
2e713a7
docs: Add Zed to IDE list.
osiewicz Oct 11, 2023
b769f34
chore: move common code to function
pvalletbo Oct 11, 2023
7eec17e
Auto merge of #15745 - osiewicz:add-zed-to-ide-list, r=lnicola
bors Oct 11, 2023
4b281ff
chore: format imports
pvalletbo Oct 11, 2023
6845c80
fix: format
pvalletbo Oct 11, 2023
3605bb3
fix CI: generate doctest
Young-Flash Oct 12, 2023
84e1d27
Auto merge of #15743 - Young-Flash:replace_is_some_with_if_let_some, …
bors Oct 12, 2023
506b1e5
feat: add replace_is_ok_with_if_let_ok assist
Young-Flash Oct 12, 2023
5bbca22
update mod order to adapt alphabetically sorted
Young-Flash Oct 12, 2023
862693f
Auto merge of #15752 - Young-Flash:replace_is_method_with_if_let_meth…
bors Oct 13, 2023
bc34e8f
feat: make cursor select at _tmp
Young-Flash Oct 14, 2023
3f4368a
fix: fix typo in mbe/lib.rs comment
harpsword Oct 14, 2023
16ac6c2
Auto merge of #15756 - harpsword:fix_typo_in_mbe_lib, r=lnicola
bors Oct 14, 2023
8217ff9
make ProjectionStore-impls pub-accessible
ChristianSchott Oct 14, 2023
dbe5392
Auto merge of #15760 - ChristianSchott:master, r=HKalbasi
bors Oct 14, 2023
65532e4
Auto merge of #15755 - Young-Flash:cursor_selection, r=lnicola
bors Oct 15, 2023
d33fd15
Fix metrics workflow to use deploy key
Veykril Oct 15, 2023
a8581aa
Auto merge of #15762 - Veykril:metrics-deploy, r=Veykril
bors Oct 15, 2023
40acc52
Update rustc_abi dependency
Veykril Sep 29, 2023
6572ec8
Auto merge of #15691 - Veykril:rustc_abi, r=Veykril
bors Oct 15, 2023
03bec11
Expand Emacs documentation
Wilfred Oct 15, 2023
983094a
Auto merge of #15764 - Wilfred:emacs_docs, r=lnicola
bors Oct 16, 2023
222be48
Create .ssh before writing deploy key
lnicola Oct 16, 2023
03f676e
Auto merge of #15769 - lnicola:metrics-ssh, r=lnicola
bors Oct 16, 2023
490cdfe
Fix metrics repo url
lnicola Oct 16, 2023
2910dbf
Auto merge of #15770 - lnicola:metrics-url, r=lnicola
bors Oct 16, 2023
d6afb4f
Auto merge of #15746 - pvalletbo:string-literals-diagnose, r=Veykril
bors Oct 16, 2023
520aad1
Merge commit 'd6afb4fa239fe7b5b34e5cefa9e58148fdff65b8' into sync-fro…
lnicola Oct 17, 2023
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
2 changes: 2 additions & 0 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- auto
- try
- automation/bors/try

env:
CARGO_INCREMENTAL: 0
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }}

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

- name: Switch to stable toolchain
Expand Down
9 changes: 6 additions & 3 deletions src/tools/rust-analyzer/.github/workflows/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,14 @@ jobs:

- name: Combine json
run: |
git clone --depth 1 https://$METRICS_TOKEN@github.com/rust-analyzer/metrics.git
mkdir ~/.ssh
echo "${{ secrets.METRICS_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
chmod 700 ~/.ssh

git clone --depth 1 git@github.com:rust-analyzer/metrics.git
jq -s ".[0] * .[1] * .[2] * .[3] * .[4] * .[5]" build.json self.json ripgrep-13.0.0.json webrender-2022.json diesel-1.4.8.json hyper-0.14.18.json -c >> metrics/metrics.json
cd metrics
git add .
git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈
git push origin master
env:
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}
93 changes: 43 additions & 50 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"

[[package]]
name = "anymap"
version = "1.0.0-beta.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1f8f5a6f3d50d89e3797d7593a50f96bb2aaa20ca0cc7be1fb673232c91d72"

[[package]]
name = "arbitrary"
version = "1.3.0"
Expand Down Expand Up @@ -177,9 +171,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "chalk-derive"
version = "0.92.0"
version = "0.93.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff5053a8a42dbff5279a82423946fc56dc1253b76cf211b2b3c14b3aad4e1281"
checksum = "264726159011fc7f22c23eb51f49021ece6e71bc358b96e7f2e842db0b14162b"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -189,9 +183,9 @@ dependencies = [

[[package]]
name = "chalk-ir"
version = "0.92.0"
version = "0.93.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a56de2146a8ed0fcd54f4bd50db852f1de4eac9e1efe568494f106c21b77d2a"
checksum = "d65c17407d4c756b8f7f84344acb0fb96364d0298822743219bb25769b6d00df"
dependencies = [
"bitflags 1.3.2",
"chalk-derive",
Expand All @@ -200,9 +194,9 @@ dependencies = [

[[package]]
name = "chalk-recursive"
version = "0.92.0"
version = "0.93.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cc09e6e9531f3544989ef89b189e80fbc7ad9e2f73f1c5e03ddc9ffb0527463"
checksum = "80e2cf7b70bedaaf3a8cf3c93b6120c2bb65be89389124028e724d19e209686e"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand All @@ -213,9 +207,9 @@ dependencies = [

[[package]]
name = "chalk-solve"
version = "0.92.0"
version = "0.93.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b392e02b4c81ec76d3748da839fc70a5539b83d27c9030668463d34d5110b860"
checksum = "afc67c548d3854f64e97e67dc5b7c88513425c5bfa347cff96b7992ae6379288"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand Down Expand Up @@ -518,7 +512,6 @@ dependencies = [
name = "hir-def"
version = "0.0.0"
dependencies = [
"anymap",
"arrayvec",
"base-db",
"bitflags 2.3.2",
Expand All @@ -531,8 +524,6 @@ dependencies = [
"fst",
"hashbrown 0.12.3",
"hir-expand",
"hkalbasi-rustc-ap-rustc_abi",
"hkalbasi-rustc-ap-rustc_index",
"indexmap 2.0.0",
"intern",
"itertools",
Expand All @@ -541,7 +532,7 @@ dependencies = [
"mbe",
"once_cell",
"profile",
"ra-ap-rustc_parse_format",
"rustc-dependencies",
"rustc-hash",
"smallvec",
"stdx",
Expand Down Expand Up @@ -594,7 +585,6 @@ dependencies = [
"expect-test",
"hir-def",
"hir-expand",
"hkalbasi-rustc-ap-rustc_index",
"intern",
"itertools",
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
Expand All @@ -604,6 +594,7 @@ dependencies = [
"oorandom",
"profile",
"project-model",
"rustc-dependencies",
"rustc-hash",
"scoped-tls",
"smallvec",
Expand All @@ -617,27 +608,6 @@ dependencies = [
"typed-arena",
]

[[package]]
name = "hkalbasi-rustc-ap-rustc_abi"
version = "0.0.20221221"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adabaadad9aa7576f97af02241cdf5554d62fb3d51a84cb05d77ba28edd3013f"
dependencies = [
"bitflags 1.3.2",
"hkalbasi-rustc-ap-rustc_index",
"tracing",
]

[[package]]
name = "hkalbasi-rustc-ap-rustc_index"
version = "0.0.20221221"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4d3c48474e09afb0f5efbd6f758e05411699301a113c47d454d28ec7059d00e"
dependencies = [
"arrayvec",
"smallvec",
]

[[package]]
name = "home"
version = "0.5.5"
Expand Down Expand Up @@ -918,9 +888,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"

[[package]]
name = "libc"
version = "0.2.146"
version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"

[[package]]
name = "libloading"
Expand Down Expand Up @@ -1277,7 +1247,7 @@ dependencies = [
"drop_bomb",
"expect-test",
"limit",
"ra-ap-rustc_lexer",
"rustc-dependencies",
"sourcegen",
"stdx",
]
Expand Down Expand Up @@ -1482,31 +1452,42 @@ dependencies = [
"proc-macro2",
]

[[package]]
name = "ra-ap-rustc_abi"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a51b7a02377b3246ec5c095b852b5cf1678bd9ed6b572b2a79efbf7ad711c292"
dependencies = [
"bitflags 1.3.2",
"ra-ap-rustc_index",
"tracing",
]

[[package]]
name = "ra-ap-rustc_index"
version = "0.10.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07b5fa61d34da18e148dc3a81f654488ea07f40938d8aefb17f8b64bb78c6120"
checksum = "643ca3609870b1778d9cd1f2a8e4ccb4af0f48f3637cc257a09494d087bd93dc"
dependencies = [
"arrayvec",
"smallvec",
]

[[package]]
name = "ra-ap-rustc_lexer"
version = "0.10.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2e2f6b48422e4eed5218277ab7cc9733e60dd8f3167f4f36a49a0cafe4dc195"
checksum = "30ffd24f9ba4f1d25ff27ca1469b8d22a3bdfb12cf644fc8bfcb63121fa5da6b"
dependencies = [
"unicode-properties",
"unicode-xid",
]

[[package]]
name = "ra-ap-rustc_parse_format"
version = "0.10.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3c7369ad01cc79f9e3513c9f6a6326f6b980100e4862a7ac71b9991c88108bb"
checksum = "207b5ac1a21d4926695e03b605ffb9f63d4968e0488e9197c04c512c37303aa7"
dependencies = [
"ra-ap-rustc_index",
"ra-ap-rustc_lexer",
Expand Down Expand Up @@ -1594,10 +1575,12 @@ dependencies = [
"oorandom",
"parking_lot 0.12.1",
"parking_lot_core 0.9.6",
"parser",
"proc-macro-api",
"profile",
"project-model",
"rayon",
"rustc-dependencies",
"rustc-hash",
"scip",
"serde",
Expand Down Expand Up @@ -1626,6 +1609,16 @@ version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"

[[package]]
name = "rustc-dependencies"
version = "0.0.0"
dependencies = [
"ra-ap-rustc_abi",
"ra-ap-rustc_index",
"ra-ap-rustc_lexer",
"ra-ap-rustc_parse_format",
]

[[package]]
name = "rustc-hash"
version = "1.1.0"
Expand Down Expand Up @@ -1853,9 +1846,9 @@ dependencies = [
"proc-macro2",
"profile",
"quote",
"ra-ap-rustc_lexer",
"rayon",
"rowan",
"rustc-dependencies",
"rustc-hash",
"smol_str",
"sourcegen",
Expand Down
12 changes: 4 additions & 8 deletions src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ toolchain = { path = "./crates/toolchain", version = "0.0.0" }
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" }
rustc-dependencies = { path = "./crates/rustc-dependencies", version = "0.0.0" }

# local crates that aren't published to crates.io. These should not have versions.
proc-macro-test = { path = "./crates/proc-macro-test" }
Expand All @@ -101,11 +102,6 @@ serde = { version = "1.0.156", features = ["derive"] }
serde_json = "1.0.96"
triomphe = { version = "0.1.8", default-features = false, features = ["std"] }
# can't upgrade due to dashmap depending on 0.12.3 currently
hashbrown = { version = "0.12.3", features = ["inline-more"], default-features = false }

rustc_lexer = { version = "0.10.0", package = "ra-ap-rustc_lexer" }
rustc_parse_format = { version = "0.10.0", package = "ra-ap-rustc_parse_format", default-features = false }

# Upstream broke this for us so we can't update it
rustc_abi = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_abi", default-features = false }
rustc_index = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_index", default-features = false }
hashbrown = { version = "0.12.3", features = [
"inline-more",
], default-features = false }
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/crates/base-db/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ pub trait ProcMacroExpander: fmt::Debug + Send + Sync + RefUnwindSafe {
) -> Result<Subtree, ProcMacroExpansionError>;
}

#[derive(Debug)]
pub enum ProcMacroExpansionError {
Panic(String),
/// Things like "proc macro server was killed by OOM".
Expand Down
5 changes: 5 additions & 0 deletions src/tools/rust-analyzer/crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub enum FlycheckConfig {
extra_args: Vec<String>,
extra_env: FxHashMap<String, String>,
ansi_color_output: bool,
target_dir: Option<PathBuf>,
},
CustomCommand {
command: String,
Expand Down Expand Up @@ -308,6 +309,7 @@ impl FlycheckActor {
features,
extra_env,
ansi_color_output,
target_dir,
} => {
let mut cmd = Command::new(toolchain::cargo());
cmd.arg(command);
Expand Down Expand Up @@ -340,6 +342,9 @@ impl FlycheckActor {
cmd.arg(features.join(" "));
}
}
if let Some(target_dir) = target_dir {
cmd.arg("--target-dir").arg(target_dir);
}
cmd.envs(extra_env);
(cmd, extra_args)
}
Expand Down
10 changes: 5 additions & 5 deletions src/tools/rust-analyzer/crates/hir-def/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ rust-version.workspace = true
doctest = false

[dependencies]
anymap = "1.0.0-beta.2"
arrayvec = "0.7.2"
bitflags = "2.1.0"
cov-mark = "2.0.0-pre.1"
Expand All @@ -31,10 +30,7 @@ smallvec.workspace = true
hashbrown.workspace = true
triomphe.workspace = true

rustc_abi.workspace = true
rustc_index.workspace = true
rustc_parse_format.workspace = true

rustc-dependencies.workspace = true

# local deps
stdx.workspace = true
Expand All @@ -48,8 +44,12 @@ cfg.workspace = true
tt.workspace = true
limit.workspace = true


[dev-dependencies]
expect-test = "1.4.0"

# local deps
test-utils.workspace = true

[features]
in-rust-tree = ["rustc-dependencies/in-rust-tree"]
4 changes: 4 additions & 0 deletions src/tools/rust-analyzer/crates/hir-def/src/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ impl Attrs {
self.doc_exprs().flat_map(|doc_expr| doc_expr.aliases().to_vec())
}

pub fn export_name(&self) -> Option<&SmolStr> {
self.by_key("export_name").string_value()
}

pub fn is_proc_macro(&self) -> bool {
self.by_key("proc_macro").exists()
}
Expand Down
Loading
Loading