Lukas Wirth
430d7c6b0d
Merge pull request #19311 from aibaars/log-build-script-error
...
Log build script error output in `load_cargo::load_workspace_at`
2025-03-10 08:16:10 +00:00
Lukas Wirth
476a0cb740
Merge pull request #19314 from snprajwal/variantdef-impl
...
fix(hir): `VariantDef` is `impl HasSource`
2025-03-10 08:13:24 +00:00
Lukas Wirth
90e18005eb
Merge pull request #19252 from flodiebold/fix-fixup-delimiters
...
Fix syntax fixup producing invalid punctuation
2025-03-10 08:11:27 +00:00
Lukas Wirth
66c40fd90d
Merge pull request #19232 from ShoyuVanilla/issue-19196
...
Bump chalk for built-in supports of async closures
2025-03-10 08:11:23 +00:00
Lukas Wirth
7202146f65
Rank ADT constructors as constructors for completion scoring
2025-03-09 15:36:53 +01:00
Shoyu Vanilla
5b202cb663
fix: Prevent wrong invocations of needs_parens_in
with non-ancestral "parent"s
2025-03-09 18:54:22 +09:00
Shoyu Vanilla
c6ea7cbafa
internal: Migrate inline_local_variable
to SyntaxEditor
2025-03-09 15:51:37 +09:00
Shoyu Vanilla
00bbfb3622
Bump chalk for built-in supports of async closures
2025-03-09 11:41:08 +09:00
¨Florian
5335d8cbc5
Fix syntax fixup producing invalid punctuation
...
Fixes #19206 .
Fixes #18244 .
2025-03-08 13:21:00 +01:00
Moulins
18772836d4
Use rustc_abi
code for SIMD layout in rust-analyzer
2025-03-08 12:36:42 +01:00
Moulins
4929f38544
Remove most manual LayoutData creations and move them to rustc_abi
...
...either as:
- methods on LayoutCalculator, for faillible operations;
- constructors on LayoutData, for infaillible ones.
2025-03-08 12:27:19 +01:00
Prajwal S N
39391b0d38
fix(hir): VariantDef
is impl HasSource
...
A new syntax node `ast::VariantDef` has been introduced to map between the HIR node and the AST.
The files have been updated with `cargo test -p xtask`.
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-08 01:25:27 +05:30
Ali Bektas
93b1e7826a
Remove explicit error message when build.rs fails
2025-03-07 18:27:29 +01:00
Arthur Baars
ded92f7552
Log build script error output in load_cargo::load_workspace_at
2025-03-07 16:07:56 +01:00
Lukas Wirth
62dea277cc
Merge pull request #19308 from Veykril/push-rnrxutwlvmly
...
Move loaded project MSRV back to 1.78, show notification for the warning
2025-03-07 07:06:54 +00:00
Lukas Wirth
1427a91c62
Pop up a notification for the MSRV project loading warning
2025-03-07 07:51:53 +01:00
Lukas Wirth
0424e2e2bf
Move project MSRV back to 1.78
2025-03-07 07:51:53 +01:00
Tongjun Gao
7d68c28873
Refactor relevance scoring to use a named constant BASE_SCORE
...
Replace magic number with a named constant for improved readability and maintainability of the scoring logic
2025-03-07 14:44:57 +08:00
Tongjun Gao
88e18230ba
Fix logical error in relevance scoring implementation
2025-03-07 14:21:57 +08:00
Chayim Refael Friedman
62e7d2851b
Warn the user when a rename will change the meaning of the program
...
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it.
We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06 21:07:10 +02:00
Chayim Refael Friedman
422213cc9a
Use correct crate for trait env in render_const_scalar()
2025-03-06 21:00:08 +02:00
Chayim Refael Friedman
2fc0dc0f13
Pass the target crate in HirFormatter
...
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-06 21:00:05 +02:00
Chayim Refael Friedman
1cd9e683e8
Normalize projections in evaluated const display and layout calculation
2025-03-06 20:55:50 +02:00
Lukas Wirth
bd0289e0e9
Merge pull request #19290 from aibaars/patch-1
...
Add warning and debug information when `cargo metadata` fails
2025-03-06 13:21:24 +00:00
Arthur Baars
e98c98fa31
Change %e
to ?e
to include detailed error message
2025-03-06 12:42:35 +00:00
Tongjun Gao
98b1d5e8a3
Adjust relevance scoring threshold to consistent with existing implementations
2025-03-06 10:14:39 +08:00
Ali Bektas
8f2713564a
Show when build scripts fail what the errors were
2025-03-05 22:03:54 +01:00
Lukas Wirth
d426cbee76
Merge pull request #19292 from Veykril/push-zonnrrlosqmv
...
Fix syntax highlightingg punct filtering ignoring mods
2025-03-05 14:18:09 +00:00
Lukas Wirth
4552a3421f
Merge pull request #19279 from Natural-selection1/master
...
Improve keyword completion for 'let' and 'let mut'
2025-03-05 14:14:41 +00:00
Lukas Wirth
94915fbe48
Fix syntax highlightingg punct filtering ignoring mods
2025-03-05 15:02:44 +01:00
许杰友 Jieyou Xu (Joe)
905ddf8cd8
Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk
...
Remove unsizing coercions for tuples
See https://github.com/rust-lang/rust/issues/42877#issuecomment-2686010847 and below comments for justification.
Tracking issue: #42877
Fixes : #135217
2025-03-05 21:46:44 +08:00
Lukas Wirth
27dc614627
Merge pull request #19274 from Veykril/push-pouwrwwrlrlt
...
Highlight unsafe operations as unsafe, not definitions
2025-03-05 12:57:25 +00:00
Lukas Wirth
9fc0ffe008
Use HIR unsafety information for unsafe syntax highlightng
2025-03-05 13:18:46 +01:00
Arthur Baars
c053cc72a7
Improve tracing log format in cargo_workspace.rs
2025-03-05 12:49:42 +01:00
Arthur Baars
55d61be9a3
Add warning and debug information when cargo metadata
fails
...
The errors are silently dropped elsewhere, which make it really hard to debug issues due to dependency download failures.
2025-03-05 10:40:11 +01:00
Tongjun Gao
3ef8a371e8
add test cases for 'letm' keyword completion
2025-03-05 17:26:30 +08:00
Thalia Archibald
0811ca0a61
Use size_of from the prelude instead of imported
...
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.
These functions were added to all preludes in Rust 1.80.
2025-03-05 00:48:44 -08:00
Thalia Archibald
0aa623e108
minicore: Add size_of to prelude and add rust_2024 prelude
2025-03-05 00:30:38 -08:00
Laurențiu Nicola
3c394c61b8
Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn-diagnostic
...
feat: Add diagnostic for dangling dyn and impl
2025-03-05 05:58:31 +00:00
Tongjun Gao
492d5e2bae
change 'let mut' keyword completion into 'ietm' snippet
2025-03-04 12:04:54 +08:00
Tongjun Gao
0b9dbe7426
Improve keyword completion for 'let' and 'let mut'
2025-03-04 11:50:11 +08:00
Matthias Krüger
a52ffa7068
Rollup merge of #137921 - lnicola:sync-from-ra, r=lnicola
...
Subtree update of `rust-analyzer`
r? `@ghost`
2025-03-03 20:47:14 +01:00
Laurențiu Nicola
1d6f53e117
Bump minimum supported toolchain to 1.82
2025-03-03 16:03:06 +02:00
Lukas Wirth
03f90b0afa
Merge pull request #19261 from Veykril/push-rnqlyrvqpols
...
Support tuple struct patterns for expand_rest_pattern assist
2025-03-03 11:51:07 +00:00
Lukas Wirth
b685ada098
Merge pull request #19243 from Veykril/push-qrrqsywkwyzp
...
Allow unsetting default cfgs
2025-03-03 11:42:40 +00:00
Lukas Wirth
8ff0b67711
Merge pull request #19244 from Veykril/push-nmnrnlysvyvk
...
Warn when the used toolchain looks too old for rust-analyzer
2025-03-03 11:41:12 +00:00
Lukas Wirth
4ad546f6a6
Support tuple struct patterns for expand_rest_pattern assist
2025-03-03 12:35:53 +01:00
bit-aloo
af959f9031
Add dangling impl
...
- Adds dangling impl diagnostics
- Rename validation test from dangling_impl to dangling_iml_ref
2025-03-03 15:58:33 +05:30
Laurențiu Nicola
071eda7d91
Merge pull request #19269 from lnicola/sync-from-rust
...
minor: sync from downstream
2025-03-03 07:00:48 +00:00
Laurențiu Nicola
2244c99b69
Merge from rust-lang/rust
2025-03-03 08:38:46 +02:00