Skip to content

Subtree update of rust-analyzer #140385

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 426 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
426 commits
Select commit Hold shift + click to select a range
281ca97
Merge pull request #19474 from Veykril/push-nokkzzvwynnt
Veykril Mar 29, 2025
814d7c3
Fix debug sourceFileMap when using cppvsdbg
inflation Mar 29, 2025
a2083a5
Merge pull request #19475 from inflation/push-xrwpqzsqxtuy
lnicola Mar 29, 2025
a451b04
fix: Cleanup param name inlay hint filtering
Veykril Mar 31, 2025
8c7aa53
Merge pull request #19482 from Veykril/push-orrorupvlqpt
Veykril Mar 31, 2025
ed75e2a
fix: Fix new nightly lints
Veykril Mar 31, 2025
03fee91
Merge pull request #19484 from Veykril/push-ttvnzlkvwssk
Veykril Mar 31, 2025
73a3d4a
chore: Clean CI a bit
Veykril Mar 31, 2025
bca0d60
Merge pull request #19485 from Veykril/push-mqlnvzkuplnm
Veykril Mar 31, 2025
f8a9c92
fix: Fix panic in progress due to splitting unicode incorrectly
rossdylan Apr 1, 2025
409e0ac
Merge pull request #19490 from rossdylan/fix-unicode-progress-report
ChayimFriedman2 Apr 1, 2025
ad7c4cf
Avoid relying on `block_def_map()` needlessly
ChayimFriedman2 Apr 1, 2025
6698106
Merge pull request #19492 from ChayimFriedman2/experiment
ChayimFriedman2 Apr 1, 2025
b0fbec6
chore: Disable rust-cache in CI
Veykril Apr 1, 2025
fabb6fd
Merge pull request #19493 from Veykril/push-tlwonkmlonqv
Veykril Apr 1, 2025
0394116
chore: Replace some `invoke`s with `invoke_actual` in hir-ty
Veykril Apr 1, 2025
6e8a96e
chore: Remove unnecessary `Arc` clones
Veykril Apr 1, 2025
73d8cd8
Merge pull request #19496 from Veykril/push-zuwsrswwtzsu
Veykril Apr 1, 2025
280c133
Merge pull request #19494 from Veykril/push-uzmzppouxuvr
Veykril Apr 1, 2025
6bb0904
Fix a bug in MBE expansion that arose from incorrect fixing of an old…
ChayimFriedman2 Apr 1, 2025
3c573ca
fix(ide-assists): remove `AssistKind::None`
snprajwal Apr 3, 2025
59240a9
feat(proc-macro-srv): support metadata version 10
snprajwal Apr 3, 2025
8408e28
Merge pull request #19509 from snprajwal/remove-assistid-none
lnicola Apr 3, 2025
3aa1b60
fix language-configuration.json
BenjaminBrienen Apr 3, 2025
9c5cdfe
Merge pull request #19514 from BenjaminBrienen/color-brackets-string
Veykril Apr 4, 2025
e9bad9c
chore: clean up some FIXMEs
snprajwal Apr 3, 2025
4bf481c
feat(project-model): provide flag for no deps
snprajwal Apr 4, 2025
9a43f02
prefer default over new
BenjaminBrienen Apr 4, 2025
8f04875
fix: don't drop references with more than one definition.
jrmuizel Apr 4, 2025
b7bc8d0
internal: fix panic in `view_crate_graph`
davidbarsky Apr 1, 2025
a44b5e0
Merge pull request #19520 from BenjaminBrienen/defaultnew
Veykril Apr 4, 2025
75403af
Merge pull request #19515 from jrmuizel/multiple-definitions
Veykril Apr 4, 2025
099d0e0
Merge pull request #19522 from davidbarsky/davidbarsky/fix-panic-in-v…
Veykril Apr 4, 2025
4c8bb77
internal: fix salsa-ified crate graph working with lazy project disco…
davidbarsky Apr 1, 2025
2a4ab6b
Merge pull request #19523 from davidbarsky/davidbarsky/fix-salsafied-…
davidbarsky Apr 4, 2025
56cf54f
Merge pull request #19519 from snprajwal/project-control-no-deps
Veykril Apr 4, 2025
5dd7526
the rustdoc file prefix for constants is "constant" not "const"
SOF3 Apr 5, 2025
cf71bb3
Merge pull request #19526 from SOF3/patch-1
lnicola Apr 5, 2025
9ba0079
Merge pull request #19501 from ChayimFriedman2/macro-expansion
Veykril Apr 5, 2025
b3e9af5
Merge pull request #19447 from Natural-selection1/add_impl_for
Veykril Apr 5, 2025
f1ed314
fix: Fix `format_args` lowering for >=1.87
Veykril Apr 6, 2025
d3d1f49
Merge pull request #19531 from Veykril/push-kxyrpznnllkx
Veykril Apr 6, 2025
7812f55
chore: Set up a proper job matrix for rust-cross
Veykril Apr 6, 2025
fb0dd65
Merge pull request #19533 from Veykril/push-zxlpwkvzxzws
Veykril Apr 6, 2025
6c52687
upstream stdx changes
BenjaminBrienen Apr 4, 2025
3cd9318
Merge pull request #19512 from BenjaminBrienen/update-stdx
Veykril Apr 7, 2025
b91731c
Merge pull request #19432 from ShoyuVanilla/issue-19431
Veykril Apr 7, 2025
dfe13e5
Merge pull request #19511 from snprajwal/fixmes
Veykril Apr 7, 2025
50f3e01
Merge pull request #19425 from ConradIrwin/drop-drop-glue-goo
Veykril Apr 7, 2025
ac3a2b9
added children modules
geetanshjuneja Mar 10, 2025
7b37e91
cargo xtask tidy
geetanshjuneja Apr 7, 2025
d88e70c
Port closure inference from rustc
jackh726 Apr 5, 2025
112ca25
fix(auto-import): Prefer imports of matching types for argument lists
Veykril Apr 8, 2025
d9a440b
Merge pull request #19541 from Veykril/push-twqrorwqzmwv
Veykril Apr 8, 2025
620b404
Merge pull request #19536 from jackh726/closure-infer
davidbarsky Apr 8, 2025
f4848a7
refactor: Lower type-refs before type inference
Veykril Jan 25, 2025
b2835b5
Merge pull request #19462 from Veykril/push-ypvprvvwkyll
Veykril Apr 9, 2025
cf63ce3
Merge pull request #19255 from geetanshjuneja/master
Veykril Apr 9, 2025
32e3f84
refactor: Turn `LifetimeRef` into an enum
Veykril Apr 9, 2025
7d7ad65
Merge pull request #19550 from Veykril/push-rsskztqzwuzk
Veykril Apr 9, 2025
d85f895
internal: rename `children_modules` to `child_modules`
davidbarsky Apr 9, 2025
5697022
internal: fix `NameGenerator`'s and `AnyMap`'s rustdocs
davidbarsky Apr 9, 2025
9e02bc5
Merge pull request #19554 from davidbarsky/davidbarsky/rename-childre…
lnicola Apr 9, 2025
d711d0a
Merge pull request #19553 from davidbarsky/davidbarsky/fix-rustdoc-tests
davidbarsky Apr 9, 2025
2f6385f
Enable `[canonicalize-issue-links]` and `[no-mentions]` in triagebot
Urgau Apr 9, 2025
df0873e
Fix a small bug with catastrophic effects
ChayimFriedman2 Apr 10, 2025
a7cdc0b
Merge pull request #19558 from rust-lang/small-bug-catastrophic-effect
ChayimFriedman2 Apr 10, 2025
231918f
fix: shadow type by module
Hmikihiro Mar 27, 2025
b9c7a9b
return single option
Hmikihiro Mar 28, 2025
a458b7d
TypeNs contain module
Hmikihiro Mar 28, 2025
b6cf8f2
Update crates/hir-def/src/resolver.rs
Hmikihiro Apr 8, 2025
6bc123f
Update crates/hir-def/src/resolver.rs
Hmikihiro Apr 8, 2025
8e3f822
Update MSRV to Rust 1.86.0
ChayimFriedman2 Apr 10, 2025
c7202e8
Remove all upcasts!
ChayimFriedman2 Apr 10, 2025
8e18cd6
Merge pull request #19559 from ChayimFriedman2/rust-186
Veykril Apr 10, 2025
a10a771
Merge pull request #19555 from Urgau/patch-1
Veykril Apr 10, 2025
3fbcd68
Merge pull request #19461 from Hmikihiro/shadow_by_module
Veykril Apr 10, 2025
baecfcd
fix: Fix invalid signature bitflags
Veykril Apr 10, 2025
26eedd8
Merge pull request #19562 from Veykril/push-uqutltwzsnmk
Veykril Apr 10, 2025
ff008f1
fix: Walk const block expressions for unsafety checking
Veykril Apr 10, 2025
2436ce0
Merge pull request #19563 from Veykril/push-xwlnkpmkqnwp
Veykril Apr 10, 2025
d84194c
chore(deps): bump crossbeam-channel from 0.5.14 to 0.5.15
dependabot[bot] Apr 10, 2025
505521e
Fix dyn compatibility code bypassing callable_item_signature query
flodiebold Apr 10, 2025
a25e7a7
Merge pull request #19564 from rust-lang/dependabot/cargo/crossbeam-c…
Veykril Apr 10, 2025
3ccb636
Merge pull request #19566 from flodiebold/push-vzpyzvpkwkyt
flodiebold Apr 10, 2025
8f547bb
internal: add `prime-caches` subcommand
davidbarsky Apr 6, 2025
9e50a30
internal: cleanup CLI flag documentation
davidbarsky Apr 10, 2025
e47bb17
Merge pull request #19565 from davidbarsky/davidbarsky/add-prime-cach…
davidbarsky Apr 10, 2025
ec53636
refactor: editor for `destructure_struct_binding`
snprajwal Apr 10, 2025
5cdddd7
fix: `make::expr_paren() -> ParenExpr`
snprajwal Apr 10, 2025
c1563be
fix: `make::expr_closure() -> ClosureExpr`
snprajwal Apr 10, 2025
1470ddb
fix: `make::expr_method_call() -> MethodCallExpr`
snprajwal Apr 10, 2025
50a17e7
fix: `make::expr_call() -> CallExpr`
snprajwal Apr 10, 2025
405ffce
Fix an incorrect `ExpressionStore` that was passed
ChayimFriedman2 Apr 10, 2025
7425cc1
Merge pull request #19570 from ChayimFriedman2/fix-store-panic
ChayimFriedman2 Apr 10, 2025
35bb73a
use underscores in the target name for test update notifications
Apr 11, 2025
d8ecbcc
test only packages that are workspace members
Apr 11, 2025
2e79c26
exclude build script targets from testing
Apr 11, 2025
5ea1764
fix clippy::useless-conversion
Apr 11, 2025
a3bc2b1
refactor: migrate `expand_rest_pattern` to editor
snprajwal Apr 11, 2025
f351279
Merge pull request #19571 from duncanawoods/19464-Regression-vs-code-…
HKalbasi Apr 11, 2025
03c71b6
ci: cancel parallel jobs if test fails
snprajwal Apr 4, 2025
c970cac
internal: Render sigantures with view hir command
Veykril Apr 13, 2025
121a12e
Merge pull request #19573 from Veykril/push-swrzvrroornr
Veykril Apr 13, 2025
552020d
Ignore errors from rustfmt which may trigger error notification
chenyukang Apr 14, 2025
8bc76c6
add normalizeDriveLetter
clouds56 Apr 14, 2025
cfdeaca
fix format
clouds56 Apr 14, 2025
601ab30
Prevent panics when there is a cyclic dependency between closures
ChayimFriedman2 Apr 14, 2025
45be9c2
Merge pull request #19576 from chenyukang/yukang-fix-rustfmt-error
Veykril Apr 14, 2025
d69a440
Add `xdist dist --pgo` command to build Rust Analyzer with PGO optimi…
Kobzol Apr 14, 2025
09ba190
Use PGO for x64 and aarch64 Linux builds on CI
Kobzol Apr 14, 2025
ef701b3
Merge pull request #19579 from ChayimFriedman2/cyclic-closure
Veykril Apr 14, 2025
0e091ac
Merge pull request #19521 from snprajwal/ci
Veykril Apr 14, 2025
eda5a2e
Merge pull request #19578 from clouds56-contrib/drive-letter
Veykril Apr 14, 2025
415b7f3
Merge pull request #19569 from snprajwal/fixmes
Veykril Apr 14, 2025
22c3043
Merge pull request #19582 from Kobzol/ci-pgo
Veykril Apr 14, 2025
9dd3561
Merge pull request #19572 from snprajwal/expand-rest-pattern
Veykril Apr 14, 2025
e4c2909
Merge pull request #19568 from snprajwal/destructure-struct-editor
Veykril Apr 14, 2025
99b6917
Do not enable PGO in combination with zigbuild
Kobzol Apr 14, 2025
d9b61b3
Merge pull request #19583 from Kobzol/revert-19582-ci-pgo
Veykril Apr 14, 2025
8d99f2f
Remove incorrect doc comment
MatrixFrog Apr 15, 2025
db2de2a
fix: `Extract into function include inline variable in fmt macro
Hmikihiro Apr 14, 2025
a539520
feat: highlight tail expression in labeled block
roife Apr 9, 2025
1411fbd
feat: Add `pub(crate) mod` option for unlinked files
roife Apr 9, 2025
38eea1b
Fix `llvm-profdata` extension on non Linux OSes
Kobzol Apr 15, 2025
d959d01
Allow passing a specific crate for PGO training
Kobzol Apr 15, 2025
ad7a8a4
Run PGO for Windows on CI
Kobzol Apr 15, 2025
2110265
Use `-q` to silence RA output
Kobzol Apr 15, 2025
4b5126e
Use `manylinux` Docker container instead of zigbuild for x64 Linux
Kobzol Apr 15, 2025
a6e7f07
Merge pull request #19586 from Kobzol/manylinux-instead-of-zigbuild
lnicola Apr 15, 2025
88723b6
Merge pull request #19585 from Kobzol/pgo-windows
lnicola Apr 15, 2025
950eba8
Use PGO on Linux x64 builds
Kobzol Apr 15, 2025
6c82380
feat: enhance signature help to display generic parameters for callab…
roife Apr 15, 2025
7104efa
Merge pull request #19595 from Kobzol/ci-linux-pgo
lnicola Apr 15, 2025
9a3a3e1
Perform PGO for aarch64 builds
Kobzol Apr 15, 2025
a2875d5
Pin rustc used for the `proc-macro-src` CI job
Kobzol Apr 16, 2025
e583dff
Merge pull request #19600 from Kobzol/pin-proc-macro-rustc
Veykril Apr 16, 2025
8feee8f
Merge pull request #19587 from MatrixFrog/patch-1
Veykril Apr 16, 2025
99f535b
Merge pull request #19588 from Hmikihiro/ext_func_module
Veykril Apr 16, 2025
66dee46
Merge pull request #19596 from roife/sig-help-info
Veykril Apr 16, 2025
da70675
fix: use `ast::TokenTree` in `make::expr_macro`
snprajwal Apr 15, 2025
1b528e6
Merge pull request #19597 from Kobzol/arm-ci
Veykril Apr 16, 2025
5c170aa
Merge pull request #19590 from roife/fix-issue-19540
Veykril Apr 16, 2025
c7f35ad
Merge pull request #19591 from snprajwal/fix-make-macro
Veykril Apr 16, 2025
9333cc7
feat: highlight tail expr when cursor is on label
roife Apr 15, 2025
54c61eb
Merge pull request #19589 from roife/fix-issue-19138
Veykril Apr 16, 2025
a28c66c
add semicolon to use
WtzLAS Apr 16, 2025
6ac2530
Fix signature of libc memory usage function on Linux
ChayimFriedman2 Apr 16, 2025
70ff412
Merge pull request #19605 from ChayimFriedman2/fix-sig
ChayimFriedman2 Apr 16, 2025
fdbc131
Use PGO on macOS x64 and arm64 builds
zamazan4ik Apr 16, 2025
41b48d4
Fix a bug with predicate lowering of associated items
ChayimFriedman2 Apr 16, 2025
7350d0f
Merge pull request #19611 from zamazan4ik/patch-1
lnicola Apr 17, 2025
908c03d
Build MacOS AArch64 releases on that platform
lnicola Apr 17, 2025
33babb7
Merge pull request #19612 from ChayimFriedman2/parent-generics
Veykril Apr 17, 2025
ac4c322
Merge pull request #19614 from lnicola/macos-14-arm64
lnicola Apr 17, 2025
e7ac9c7
Fix a panic when a trait method in an impl declares a lifetime parame…
ChayimFriedman2 Apr 16, 2025
a16cca4
Make hir-ty non-diagnostic queries transparent
ChayimFriedman2 Apr 18, 2025
6f994da
Merge pull request #19616 from ChayimFriedman2/transparent-diags
Veykril Apr 18, 2025
14c2933
Sort notable traits in hover
ChayimFriedman2 Apr 18, 2025
69f3c33
Merge pull request #19619 from ChayimFriedman2/sort-notable
ChayimFriedman2 Apr 18, 2025
c777730
Support specific revisions for pgo
lnicola Apr 18, 2025
968526f
Merge pull request #19618 from lnicola/pgo-revision
lnicola Apr 18, 2025
ad560d6
Support ide-assists raw_string suffix
A4-Tacks Apr 18, 2025
53bd634
Merge pull request #19613 from ChayimFriedman2/subst
Veykril Apr 18, 2025
4869403
Fix replace_string_with_char escaped char quote
A4-Tacks Apr 19, 2025
10a7468
don't ignore config values that fail to parse
jyn514 Apr 19, 2025
6adf7f3
Merge pull request #19628 from jyn514/warn-bad-config
Veykril Apr 19, 2025
fdcc2fa
allow using `null` to unset an environment variable
jyn514 Apr 19, 2025
5da9984
Make `HirFileId`, `EditionedFileId` and macro files Salsa struct
ChayimFriedman2 Apr 18, 2025
824d33d
Merge pull request #19617 from ChayimFriedman2/more-actual
ChayimFriedman2 Apr 19, 2025
3eb6485
Update chalk
jackh726 Apr 19, 2025
71a0f61
doc: Rework generated configuration to have anchors
bbb651 Apr 20, 2025
b2974ac
Merge pull request #19638 from bbb651/doc-config-anchors
ChayimFriedman2 Apr 20, 2025
3f0d075
doc: Fix dead manual links
bbb651 Apr 20, 2025
42de0a5
Merge pull request #19639 from bbb651/doc-fix-dead-links
ChayimFriedman2 Apr 20, 2025
d1108a7
Remove unused macro arm
ChayimFriedman2 Apr 20, 2025
7db3d21
When changing the config, do not emit an error if a field is missing
ChayimFriedman2 Apr 20, 2025
31c5918
Merge pull request #19642 from ChayimFriedman2/fix-warn
ChayimFriedman2 Apr 20, 2025
c9e272e
Parse generic consts
ChayimFriedman2 Apr 20, 2025
b290843
Get rid of static predefined symbols
ChayimFriedman2 Apr 21, 2025
3b2bb61
Remove unnecessary predefined symbol clones
ChayimFriedman2 Apr 21, 2025
5e544ed
Allow wrapping `builtin#offset_of` fields argument in parentheses
ChayimFriedman2 Apr 21, 2025
c85f63d
Back out "When changing the config, do not emit an error if a field i…
Veykril Apr 21, 2025
5d12827
fix: Fix completion_snippets_custom config always erroring
Veykril Apr 20, 2025
8f80674
Merge pull request #19636 from Veykril/push-wttkunmqyskm
Veykril Apr 21, 2025
1b40188
fix: Support unstable `UnsafePinned` struct in type layout calc
Veykril Apr 21, 2025
244713d
Merge pull request #19650 from Veykril/push-rkxrprnwqktr
Veykril Apr 21, 2025
c8527c4
feat: Allow unsetting env vars in `server.extraEnv` config
Veykril Apr 20, 2025
d47fdc1
minor: simplify and enhance notable traits rendering
roife Apr 21, 2025
fb5d3c3
feat: parse `super let`
Veykril Apr 21, 2025
7ff9578
Merge pull request #19634 from Veykril/push-mnpmxxrprymo
Veykril Apr 21, 2025
ade6329
Merge pull request #19651 from roife/enhance-notable-trait-render
Veykril Apr 21, 2025
3310726
Merge pull request #19653 from Veykril/push-lmrprywtztzt
Veykril Apr 21, 2025
3fc93c0
Merge pull request #19643 from ChayimFriedman2/generic-const-items
Veykril Apr 21, 2025
af324f2
Merge pull request #19629 from jyn514/unset-env
Veykril Apr 21, 2025
d7ddec6
Merge pull request #19604 from WtzLAS/fix-issue-19601
Veykril Apr 21, 2025
b6eb883
Merge pull request #19644 from ChayimFriedman2/const-syms
Veykril Apr 21, 2025
832f70f
refactor: Fold hygiene map into bindings themselves
Veykril Apr 21, 2025
4a5ec88
Merge pull request #19655 from Veykril/push-kunlloxnyksr
Veykril Apr 21, 2025
5c6f098
Resolve `offset_of!()` in IDE
ChayimFriedman2 Apr 21, 2025
7735f18
Merge pull request #19624 from jackh726/chalk-update
Veykril Apr 22, 2025
c1cad77
minor: Fix outdated comment in hir-ty/generics.rs
Veykril Apr 22, 2025
e51e384
Merge pull request #19662 from Veykril/push-lqqvmnonlwrx
Veykril Apr 22, 2025
5db7548
Merge pull request #19622 from A4-Tacks/raw-string-suffix
Veykril Apr 22, 2025
5e49ce9
Add two new diagnostics: one for mismatch in generic arguments count,…
ChayimFriedman2 Mar 30, 2025
f16cefb
The new diagnostic has found a bug lurking in minicore
ChayimFriedman2 Mar 30, 2025
c4e8514
Merge pull request #19479 from ChayimFriedman2/generic-mismatch
Veykril Apr 22, 2025
6f01c7f
Depend on Salsa v0.20.0
ChayimFriedman2 Apr 22, 2025
f0fa096
Adjust for new Salsa not implementing `Debug` by default
ChayimFriedman2 Apr 13, 2025
f97d90f
Adjust for `salsa::Id::from_u32()` being unsafe
ChayimFriedman2 Apr 13, 2025
e2d14a2
Adapt for new cycle handling changing in Salsa
ChayimFriedman2 Apr 14, 2025
676f212
Fix variance
ChayimFriedman2 Apr 18, 2025
a27da31
Account for `IngredientCache::get_or_create()` taking `&Zalsa` and no…
ChayimFriedman2 Apr 22, 2025
7b249d2
Merge pull request #19661 from ChayimFriedman2/salsa-v20
Veykril Apr 22, 2025
b56765c
Merge pull request #19657 from ChayimFriedman2/better-offset-of
Veykril Apr 22, 2025
68c0372
fix: panics in inlay hints that produce empty text edits for closure …
roife Apr 21, 2025
521b830
Merge pull request #19647 from roife/fix-issue-19646
Veykril Apr 22, 2025
677505f
Mark `incorrect_generics_len` diagnostic as experimental
Veykril Apr 23, 2025
8632b52
Merge pull request #19670 from Veykril/push-owsrlsmlzttm
Veykril Apr 23, 2025
084bd9f
fix: Fix incorrect diagnostic for lifetime parameter count mismatch
Veykril Apr 23, 2025
ebcb693
Merge pull request #19672 from Veykril/push-tqooypklusty
Veykril Apr 23, 2025
06afa11
Properly handle lifetimes when checking generic arguments len
ChayimFriedman2 Apr 24, 2025
c596874
Merge pull request #19676 from ChayimFriedman2/lifetimes
Veykril Apr 24, 2025
c5ea5bf
refactor: Remove `WherePredicateTypeTarget`
Veykril Apr 24, 2025
cd064e7
fix: Fix type argument mismatch incorrectly triggering on inferred tr…
Veykril Apr 24, 2025
de08212
Correctly set `infer_args = true` in more places
ChayimFriedman2 Apr 24, 2025
d1deab5
Shrink `WherePredicate` by 8 bytes
Veykril Apr 24, 2025
eed0fd4
Merge pull request #19677 from Veykril/push-xkzwkrpypuqo
Veykril Apr 24, 2025
1fbe9e3
Arena allocate `LifetimeRef`s
Veykril Apr 24, 2025
f801657
Merge pull request #19675 from Veykril/push-uuluymsosttr
Veykril Apr 24, 2025
00732c0
Merge pull request #19678 from Veykril/push-mkznvpsktnnz
Veykril Apr 24, 2025
1993def
Always error when failed to parse DiscoverProjectMessage
darichey Apr 25, 2025
40a3f84
Merge pull request #19684 from darichey/error-parse-discover
Veykril Apr 25, 2025
42f6877
`shrink_to_fit()` in more places
ChayimFriedman2 Apr 25, 2025
5dac463
Upgrade dashmap and hashbrown
ChayimFriedman2 Apr 25, 2025
31523ae
Switch `AstIdMap` to `hashbrown::HashTable` from the raw API
ChayimFriedman2 Apr 25, 2025
61ddcf0
Merge pull request #19688 from ChayimFriedman2/less-unused
Veykril Apr 25, 2025
4792652
Preallocate `parser::Input`
ChayimFriedman2 Apr 25, 2025
1925c25
Merge pull request #19690 from ChayimFriedman2/preallocate-input
ChayimFriedman2 Apr 25, 2025
b161cb5
Clarify text for add_braces assist
Wilfred Apr 26, 2025
f95b70a
Merge pull request #19697 from Wilfred/clarify_braces_assist
Veykril Apr 26, 2025
9a00c99
feat: adds an assist to remove underscores from used variables
vishruth-thimmaiah Apr 25, 2025
4ed9b12
Merge pull request #19692 from vishruth-thimmaiah/remove_underscore_f…
ChayimFriedman2 Apr 26, 2025
fdb5ede
Preparing for merge from rust-lang/rust
lnicola Apr 28, 2025
4d28d53
Merge from rust-lang/rust
lnicola Apr 28, 2025
1923f90
Format code
lnicola Apr 28, 2025
f89fcbe
Add bootstrap cfg
lnicola Apr 28, 2025
5008c6a
Merge pull request #19702 from lnicola/sync-from-rust
lnicola Apr 28, 2025
36ed4aa
Add foldhash license exception
lnicola Apr 28, 2025
ce6a066
Unelide lifetime
lnicola Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

<!--
Troubleshooting guide: https://rust-analyzer.github.io/manual.html#troubleshooting
Troubleshooting guide: https://rust-analyzer.github.io/book/troubleshooting.html
Forum for questions: https://users.rust-lang.org/c/ide/14

Before submitting, please make sure that you're not running into one of these known issues:
Expand All @@ -28,7 +28,7 @@ Otherwise please try to provide information which will help us to fix the issue

**repository link (if public, optional)**: (eg. [rust-analyzer](https://github.com/rust-lang/rust-analyzer))

**code snippet to reproduce**:
**code snippet to reproduce**:
```rust
// add your code here

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

<!--
Troubleshooting guide: https://rust-analyzer.github.io/manual.html#troubleshooting
Troubleshooting guide: https://rust-analyzer.github.io/book/troubleshooting.html

Please try to provide information which will help us to fix the issue faster. Minimal reproducible examples with few dependencies are especially lovely <3.
-->
Expand Down
193 changes: 124 additions & 69 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ env:
CARGO_NET_RETRY: 10
CI: 1
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings -D elided_lifetimes_in_paths -D explicit_outlives_requirements -D unsafe_op_in_unsafe_fn -D unused_extern_crates -D unused_lifetimes -D unreachable_pub"
RUSTUP_MAX_RETRIES: 10

jobs:
Expand All @@ -25,7 +24,6 @@ jobs:
pull-requests: read
outputs:
typescript: ${{ steps.filter.outputs.typescript }}
proc_macros: ${{ steps.filter.outputs.proc_macros }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@1441771bbfdd59dcd748680ee64ebd8faab1a242
Expand All @@ -34,52 +32,54 @@ jobs:
filters: |
typescript:
- 'editors/code/**'
proc_macros:
- 'crates/tt/**'
- 'crates/proc-macro-api/**'
- 'crates/proc-macro-srv/**'
- 'crates/proc-macro-srv-cli/**'

proc-macro-srv:
needs: changes
if: github.repository == 'rust-lang/rust-analyzer' && needs.changes.outputs.proc_macros == 'true'
if: github.repository == 'rust-lang/rust-analyzer'
name: proc-macro-srv
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"

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

- name: Install rustup-toolchain-install-master
run: cargo install rustup-toolchain-install-master@1.6.0

# Install a pinned rustc commit to avoid surprises
- name: Install Rust toolchain
run: |
rustup update --no-self-update nightly
rustup default nightly
rustup component add --toolchain nightly rust-src rustfmt
RUSTC_VERSION=`cat rust-version`
rustup-toolchain-install-master ${RUSTC_VERSION} -c rust-src -c rustfmt
rustup default ${RUSTC_VERSION}

# Emulate a nightly toolchain, because the toolchain installed above does not have "nightly"
# in its version string.
- name: Emulate a nightly toolchain
run: echo "RUSTC_BOOTSTRAP=1" >> $GITHUB_ENV

# 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@9bdad043e88c75890e36ad3bbc8d27f0090dd609

- name: Bump opt-level
if: matrix.os == 'ubuntu-latest'
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml

- name: Test
run: cargo test --features sysroot-abi -p rust-analyzer -p proc-macro-srv -p proc-macro-srv-cli -p proc-macro-api -- --quiet
run: cargo test --features sysroot-abi -p proc-macro-srv -p proc-macro-srv-cli -p proc-macro-api -- --quiet

- name: Check salsa dependency
run: "! (cargo tree -p proc-macro-srv-cli | grep -q salsa)"

rust:
if: github.repository == 'rust-lang/rust-analyzer'
name: Rust
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: "-Dwarnings"
CC: deny_c

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

Expand All @@ -93,7 +93,7 @@ jobs:
run: |
rustup update --no-self-update stable
rustup default stable
rustup component add --toolchain stable rust-src
rustup component add --toolchain stable rust-src clippy
# We always use a nightly rustfmt, regardless of channel, because we need
# --file-lines.
rustup toolchain install nightly --profile minimal --component rustfmt
Expand All @@ -102,63 +102,122 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: echo "::add-matcher::.github/rust.json"

- name: Cache Dependencies
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
# - name: Cache Dependencies
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
# with:
# workspaces: |
# . -> target
# ./crates/proc-macro-srv/proc-macro-test/imp -> target

- name: Bump opt-level
if: matrix.os == 'ubuntu-latest'
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml
- name: Install nextest
uses: taiki-e/install-action@nextest

- name: Codegen checks (rust-analyzer)
if: matrix.os == 'ubuntu-latest'
run: cargo codegen --check

- name: Compile (tests)
run: cargo test --no-run --locked
- name: Compile tests
run: cargo test --no-run

# It's faster to `test` before `build` ¯\_(ツ)_/¯
- name: Compile (rust-analyzer)
if: matrix.os == 'ubuntu-latest'
run: cargo build --quiet
- name: Run tests
run: cargo nextest run --no-fail-fast --hide-progress-bar --status-level fail

- name: Test
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' || github.event_name == 'push'
run: cargo test -- --quiet
- name: Cancel parallel jobs
if: failure()
run: |
# https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#cancel-a-workflow-run
curl -L \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel

- name: Run Clippy
if: matrix.os == 'macos-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: Switch to stable toolchain
analysis-stats:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest
env:
RUSTC_BOOTSTRAP: 1

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

- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup component add --toolchain stable rust-src clippy
rustup default stable
rustup component add rustfmt

- name: Run analysis-stats on rust-analyzer
if: matrix.os == 'ubuntu-latest'
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .
# - name: Cache Dependencies
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- name: Run analysis-stats on the rust standard libraries
if: matrix.os == 'ubuntu-latest'
env:
RUSTC_BOOTSTRAP: 1
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps --no-sysroot --no-test $(rustc --print sysroot)/lib/rustlib/src/rust/library/
- name: Bump opt-level
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml

- name: clippy
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
- run: cargo build -p rust-analyzer

- name: rustfmt
if: matrix.os == 'ubuntu-latest'
run: cargo fmt -- --check
- name: ./rust-analyzer
run: ./target/debug/rust-analyzer analysis-stats . -q

- name: sysroot/lib/rustlib/src/rust/library/
run: ./target/debug/rust-analyzer analysis-stats --with-deps --no-sysroot --no-test $(rustc --print sysroot)/lib/rustlib/src/rust/library/ -q

rustfmt:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest

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

- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup default stable
rustup component add rustfmt

- run: cargo fmt -- --check

miri:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest

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

- name: Install Rust toolchain
run: |
rustup update --no-self-update nightly
rustup default nightly
rustup component add miri

# - name: Cache Dependencies
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- run: cargo miri test -p intern

# Weird targets to catch non-portable code
rust-cross:
if: github.repository == 'rust-lang/rust-analyzer'
name: Rust Cross
runs-on: ubuntu-latest

strategy:
matrix:
target: [powerpc-unknown-linux-gnu, x86_64-unknown-linux-musl, wasm32-unknown-unknown]
include:
# The rust-analyzer binary is not expected to compile on WASM, but the IDE
# crate should
- target: wasm32-unknown-unknown
ide-only: true
env:
targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl"
# The rust-analyzer binary is not expected to compile on WASM, but the IDE
# crate should
targets_ide: "wasm32-unknown-unknown"
RUSTFLAGS: "-Dwarnings"

steps:
- name: Checkout repository
Expand All @@ -167,19 +226,15 @@ jobs:
- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup target add ${{ env.targets }} ${{ env.targets_ide }}
rustup target add ${{ matrix.target }}

- name: Cache Dependencies
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
# - name: Cache Dependencies
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- name: Check
run: |
for target in ${{ env.targets }}; do
cargo check --target=$target --all-targets
done
for target in ${{ env.targets_ide }}; do
cargo check -p ide --target=$target --all-targets
done
- run: cargo check --target=${{ matrix.target }} --all-targets -p ide
if: ${{ matrix.ide-only }}
- run: cargo check --target=${{ matrix.target }} --all-targets
if: ${{ !matrix.ide-only }}

typescript:
needs: changes
Expand Down Expand Up @@ -261,7 +316,7 @@ jobs:
run: typos

conclusion:
needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv]
needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv, miri, rustfmt, analysis-stats]
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
Expand Down
29 changes: 22 additions & 7 deletions src/tools/rust-analyzer/.github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,37 @@ jobs:
- os: windows-latest
target: x86_64-pc-windows-msvc
code-target: win32-x64
pgo: clap-rs/clap@v4.5.36
- os: windows-latest
target: i686-pc-windows-msvc
pgo: clap-rs/clap@v4.5.36
- os: windows-latest
target: aarch64-pc-windows-msvc
code-target: win32-arm64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
zig_target: x86_64-unknown-linux-gnu.2.28
# Use a container with glibc 2.28
# Zig is not used because it doesn't work with PGO
container: quay.io/pypa/manylinux_2_28_x86_64
code-target: linux-x64
- os: ubuntu-latest
pgo: clap-rs/clap@v4.5.36
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
zig_target: aarch64-unknown-linux-gnu.2.28
container: quay.io/pypa/manylinux_2_28_aarch64
code-target: linux-arm64
pgo: clap-rs/clap@v4.5.36
- os: ubuntu-latest
target: arm-unknown-linux-gnueabihf
zig_target: arm-unknown-linux-gnueabihf.2.28
code-target: linux-armhf
- os: macos-13
target: x86_64-apple-darwin
code-target: darwin-x64
- os: macos-13
pgo: clap-rs/clap@v4.5.36
- os: macos-14
target: aarch64-apple-darwin
code-target: darwin-arm64
pgo: clap-rs/clap@v4.5.36

name: dist (${{ matrix.target }})
runs-on: ${{ matrix.os }}
Expand All @@ -71,10 +79,17 @@ jobs:
with:
node-version: 22

- name: Install rustup
if: ${{ matrix.container }}
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup component add rust-src
# llvm-tools contain the llvm-profdata tool which is needed for PGO
rustup component add rust-src ${{ matrix.pgo && 'llvm-tools' || '' }}
rustup target add ${{ matrix.target }}

- name: Install Zig toolchain
Expand All @@ -87,11 +102,11 @@ jobs:

- name: Dist (plain)
if: ${{ !matrix.zig_target }}
run: cargo xtask dist --client-patch-version ${{ github.run_number }}
run: cargo xtask dist --client-patch-version ${{ github.run_number }} ${{ matrix.pgo && format('--pgo {0}', matrix.pgo) || ''}}

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

- run: npm ci
working-directory: editors/code
Expand Down
Loading
Loading