1192 Commits

Author SHA1 Message Date
Laurențiu Nicola
bf51af1a6d Merge from rust-lang/rust 2025-02-10 07:49:43 +02:00
Lukas Wirth
0fd4fc3522
Merge pull request #19084 from Veykril/push-muworpzpzqup
Split cache priming into distinct phases
2025-02-04 13:57:39 +00:00
Lukas Wirth
ab5e821d97 Expose symbol of CrateName 2025-02-04 14:38:58 +01:00
Lukas Wirth
d6645d11da Fix some mir eval/lowerings 2025-02-03 14:42:41 +01:00
Bastian Kersting
8196d260e8 Insert null checks for pointer dereferences when debug assertions are enabled
Similar to how the alignment is already checked, this adds a check
for null pointer dereferences in debug mode. It is implemented similarly
to the alignment check as a MirPass.

This is related to a 2025H1 project goal for better UB checks in debug
mode: https://github.com/rust-lang/rust-project-goals/pull/177.
2025-01-31 11:13:34 +00:00
bors
702da50daa Auto merge of #136117 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-01-29 08:43:30 +00:00
Marijn Schouten
e766255067 parse_format optimize import use 2025-01-28 19:33:00 +01:00
David Barsky
be3307450f Back out "feat: Implement default-field-values"
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
2025-01-27 17:30:35 -05:00
David Barsky
35f6123059 Back out "Handle missing fields diagnostics"
This backs out commit e6a103ae50699db1dbb0676d075a4bcda2247939.
2025-01-27 17:30:35 -05:00
David Barsky
f3451d54d6 Back out "Merge record lit's ellipsis into pre-existing spread's variant"
This backs out commit c134b20c9cbc88a36e77acb8522e8dc4573bd906.
2025-01-27 17:30:35 -05:00
David Barsky
77c1507048 Back out "Compute diagnostics of a field body iff it has one"
This backs out commit b4d4d02db8a95f5507fbd0aa90904d7b774f0027.
2025-01-27 17:30:35 -05:00
David Barsky
e1b9a01c69 Back out "Implement HasResolver and HasModule for FieldId"
This backs out commit ce9da9063097c26006886b3f403a0c50790c285a.
2025-01-27 17:30:34 -05:00
David Barsky
52ee4ee1df Back out "Add a test for field default value body as defining usage of TAIT"
This backs out commit 4fe18a6fb5a1181a04c47391f558ebab5b8b0f39.
2025-01-27 17:30:34 -05:00
David Barsky
55d3851820 Back out "Remove has_default from FieldId"
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
2025-01-27 17:30:34 -05:00
Chayim Refael Friedman
55c63abc59 Fix #[rustc_deprecated_safe_2024]
It should be considered by the edition of the caller, not the callee.

Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
2025-01-27 14:35:20 +02:00
Shoyu Vanilla
8aa6c09fce Remove has_default from FieldId 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
4fe18a6fb5 Add a test for field default value body as defining usage of TAIT 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
ce9da90630 Implement HasResolver and HasModule for FieldId 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
b4d4d02db8 Compute diagnostics of a field body iff it has one 2025-01-27 19:41:57 +09:00
Shoyu Vanilla
c134b20c9c Merge record lit's ellipsis into pre-existing spread's variant 2025-01-27 19:41:54 +09:00
Shoyu Vanilla
e6a103ae50 Handle missing fields diagnostics 2025-01-27 19:38:39 +09:00
Shoyu Vanilla
7de0b2e75a feat: Implement default-field-values 2025-01-27 19:38:35 +09:00
Lukas Wirth
35b55fd67f
Merge pull request #19036 from Veykril/push-nprltlwvryxw
Split out `ExpressionStore` from `Body`
2025-01-27 07:54:44 +00:00
Chayim Refael Friedman
791b1ebfd4 Support RFC 2396
AKA. target_feature 1.1, or non unsafe target_feature.
2025-01-26 23:31:58 +02:00
Lukas Wirth
3bb0ff3480 Add GenericDefId::StaticId 2025-01-26 11:07:54 +01:00
Lukas Wirth
55d1d5dd8b Split out ExpressionStore from Body 2025-01-26 11:02:00 +01:00
Lukas Wirth
db6d23c0e5 Cleanup body ast ptr defs 2025-01-25 14:47:16 +01:00
Lukas Wirth
724455bf5a BodyCollector 2025-01-25 14:43:22 +01:00
Lukas Wirth
6012e961a7 Combine pat_hyigene and expr_hygiene 2025-01-25 14:28:43 +01:00
Lukas Wirth
b31f53e0d6 Fix flyimport not filtering via stability of import path 2025-01-25 12:18:54 +01:00
Lukas Wirth
6e4c29f7ce
Merge pull request #19018 from Veykril/push-wxqqunxwrply
internal: Record the use tree index in glob imports
2025-01-24 14:27:49 +00:00
Lukas Wirth
433888c4b2 Record the use tree index in glob imports 2025-01-24 15:12:48 +01:00
Lukas Wirth
3a163faba1
Merge pull request #19012 from ShoyuVanilla/arbitrary-self
feat: Implement `arbitrary-self-types`
2025-01-24 14:04:34 +00:00
Shoyu Vanilla
f4dfbc38c8 feat: Implement arbitrary-self-types 2025-01-24 22:50:59 +09:00
Lukas Wirth
93de80d833
Merge pull request #19016 from Veykril/push-moqnsytyrupu
fix: Fix `ItemScope` not recording glob imports
2025-01-24 13:25:39 +00:00
Lukas Wirth
3b88a2f134 Fix ItemScope not recording glob imports
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-24 14:11:45 +01:00
David Richey
1b6f95e885 Check cfg when collecting macro defs 2025-01-23 17:36:45 -06:00
Lukas Wirth
76585539f5 Cleanup Name string rendering 2025-01-21 10:05:32 +01:00
Lukas Wirth
03ea40369f Move dual blanket impl logic from source analyzer to goto_def 2025-01-20 16:24:42 +01:00
Lukas Wirth
93a5846784
Merge pull request #18967 from Veykril/push-pwonkmwqmmol
Properly record meaningful imports as re-exports in symbol index
2025-01-20 13:46:52 +00:00
Lukas Wirth
0480ebef75 Preserve impl assoc names in ImplData 2025-01-20 14:29:11 +01:00
Lukas Wirth
51cc1a4614 Properly record meaningful imports as re-exports in symbol index 2025-01-20 14:29:11 +01:00
Chayim Refael Friedman
044c831f7f Fix a bug where enum variants were not considered properly in type ns resolution
They should be considered just as well as in value ns, for example for struct literals.
2025-01-19 06:31:23 +02:00
lh123
9809143562 feat: complete raw, const keyword 2025-01-16 18:27:59 +08:00
Lukas Wirth
4f35021ca9
Merge pull request #18907 from Veykril/push-uqlzpttmvurv
Implement `#[rust_analyzer::skip]` for bodies
2025-01-10 13:59:23 +00:00
Lukas Wirth
f209d50dcf Implement #[rust_analyzer::skip] for bodies 2025-01-10 14:41:27 +01:00
Lukas Wirth
bf669dab84 Re-implement rust string highlighting via tool attribute 2025-01-10 13:49:35 +01:00
Lukas Wirth
3fe50ef83c
Merge pull request #18861 from ChayimFriedman2/await-edition
fix: Make edition per-token, not per-file
2025-01-09 10:20:11 +00:00
Chayim Refael Friedman
97afb7bfba Make edition per-token, not per-file
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-09 05:43:08 +02:00
Laurențiu Nicola
cd12ef8547
Merge pull request #18853 from ChayimFriedman2/no-completion
Fix case where completion inside macro that expands to `#[test]` was unavailable
2025-01-07 06:44:50 +00:00