33355 Commits

Author SHA1 Message Date
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
Lukas Wirth
565087f0ff
Merge pull request #19037 from ChayimFriedman2/fix-other-test
fix: In completion's expand, consider recursion stop condition (when we're not inside a macro call anymore) *after* the recursive call instead of before it
2025-01-27 07:37:27 +00:00
Lukas Wirth
9d5b11b2c3
Merge pull request #19038 from ChayimFriedman2/unused-unsafe
feat: Support RFC 2396
2025-01-27 07:36:15 +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
Chayim Refael Friedman
cf8ae2c694 In completion's expand, consider recursion stop condition (when we're not inside a macro call anymore) *after* the recursive call instead of before it
This is because our detection is imperfect, and miss some cases such as an impersonating `test` macro, so we hope we'll expand successfully in this case.
2025-01-26 19:08:10 +02:00
bors
3c9f396270 Auto merge of #135764 - nikic:llvm-20-test-fixes, r=wesleywiser
Fix tests on LLVM 20

For sparcv8plus.rs, duplicate the test for LLVM 19 and LLVM 20. LLVM 20 resolves one of the FIXME in the test.

For x86_64-bigint-add.rs split the check lines for LLVM 19 and LLVM 20. The difference in codegen here is due to a difference in unroll factor, which I believe is not what the test is interested in.

Fixes https://github.com/rust-lang/rust/issues/132957.
Fixes https://github.com/rust-lang/rust/issues/133754.
2025-01-26 14:54:01 +00: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
bors
7c7c52ecd1 Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk
Get rid of `mir::Const::from_ty_const`

This function is strange, because it turns valtrees into `mir::Const::Value`, but the rest of the const variants stay as type system consts.

All of the callsites except for one in `instsimplify` (array length simplification of `ptr_metadata` call) just go through the valtree arm of the function, so it's easier to just create a `mir::Const` directly for those.

For the instsimplify case, if we have a type system const we should *keep* having a type system const, rather than turning it into a `mir::Const::Value`; it doesn't really matter in practice, though, bc `usize` has no padding, but it feels more principled.
2025-01-26 09:26:34 +00:00
Lukas Wirth
2df4ecfc74
Merge pull request #19035 from rust-lang/Veykril-patch-1
Update outdated permissions section in the README.md
2025-01-27
2025-01-26 07:12:02 +00:00
Lukas Wirth
6e9f27dbc9
Update outdated permissions section in the README.md 2025-01-26 07:57:08 +01:00
Lukas Wirth
6e4d64ea4a
Merge pull request #19034 from ChayimFriedman2/complete-hidden-variant
fix: Don't complete doc(hidden) enum variants and use trees
2025-01-26 06:47:34 +00:00
Chayim Refael Friedman
be9710ea6f
Merge pull request #19033 from ChayimFriedman2/span-1
fix: Make proc_macro span's line & column 1-indexed, as documented
2025-01-26 06:41:54 +00:00
Chayim Refael Friedman
3f2fb17042 Make proc_macro span's line & column 1-indexed, as documented
That is, make the fake number that we return 1 and not 0.
2025-01-26 08:27:24 +02:00
Chayim Refael Friedman
f7746cffc2 Don't complete doc(hidden) enum variants and use trees
Also refactor the check a bit.
2025-01-26 00:13:11 +02:00
Lukas Wirth
90bf50c011
Merge pull request #19020 from ShoyuVanilla/issues-19007
fix: Prevent infinite recursion of bounds formatting
2025-01-25 19:03:54 +00:00
Shoyu Vanilla
3fe7415c83 fix: Prevent infinite recursion of bounds formatting 2025-01-26 03:37:00 +09:00
bors
395603e6d8 Auto merge of #119286 - jyn514:linker-output, r=bjorn3
show linker output even if the linker succeeds

Show stderr and stderr by default, controlled by a new `linker_messages` lint.

fixes https://github.com/rust-lang/rust/issues/83436. fixes https://github.com/rust-lang/rust/issues/38206. cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408986134

<!-- try-job: dist-x86_64-msvc -->
try-job: aarch64-apple

r? `@bjorn3`
2025-01-25 17:16:33 +00: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
d6bf619606
Merge pull request #19030 from Veykril/push-wuzvopyooznm
fix: Fix markdown horizontal ruler sometimes being treated as a heading
2025-01-25 13:22:39 +00:00
Lukas Wirth
79699e0a6c fix: Fix markdown horizontal ruler sometimes being treated as a heading 2025-01-25 14:07:54 +01:00
Lukas Wirth
39962ff7fe
Merge pull request #18909 from Veykril/push-rrpprwwzttkt
Use `strict_provenance`
2025-01-25 13:06:26 +00:00
Lukas Wirth
090a145d44 Use strict_provenance 2025-01-25 13:47:07 +01:00
Lukas Wirth
b7a3d606ea
Merge pull request #19029 from Veykril/push-wklzwzqvkrou
internal: Skip redundant path search in `resolve_completion_edits`
2025-01-25 12:17:22 +00:00
Lukas Wirth
ae74cc3b88 Skip redundant path search in resolve_completion_edits 2025-01-25 13:03:01 +01:00
Lukas Wirth
5df0b592c1
Merge pull request #19028 from Veykril/push-vuytpkvqzwzs
fix: Fix flyimport not filtering via stability of import path
2025-01-25 11:34:36 +00:00
Lukas Wirth
b31f53e0d6 Fix flyimport not filtering via stability of import path 2025-01-25 12:18:54 +01:00
Lukas Wirth
fbf3d08a30
Merge pull request #19026 from Veykril/push-wrxrutptywzx
Only collect implicit visibile use symbols if they have renames
2025-01-25 10:27:26 +00:00
Lukas Wirth
7acf8dcf7b Only collect implicit visibile use symbols if they have renames
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-25 11:12:06 +01:00
Lukas Wirth
e22bcfbf57
Merge pull request #18973 from ThouCheese/feat/nice-niches
Make niches into nices
2025-01-25 09:17:05 +00:00
Lukas Wirth
914da2ece3
Merge pull request #19023 from Wilfred/sequence_type_names
minor: Suggest better names when a type is a sequence
2025-01-25 08:13:42 +00:00
Lukas Wirth
2f3f6c987f
Merge pull request #19019 from darichey/add-buildfiles
Explicitly add buildfiles when constructing ProjectFolders
2025-01-25 08:02:38 +00:00
Wilfred Hughes
deda58e8f1 manual: Convert to mdbook
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on #15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-24 13:23:22 -08:00
Wilfred Hughes
4c34352517 minor: Suggest better names when a type is a sequence
Previously, we'd suggest a type of `vec` for a value of type `Vec<T>`,
which is rarely what the user wants. We also had no suggestions for
values of type `&[T]`.

Instead, try to pluralise the inner type name, and fall back to
`items`.
2025-01-24 11:30:19 -08:00
David Richey
c0c7d5a2e1 Explicitly add buildfiles when constructing ProjectFolders 2025-01-24 09:59:06 -06: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
a62e2f513a
Merge pull request #18991 from Veykril/push-rmqmnrymwmoz
Keep already computed inlay hint properties instead of late resolving them
2025-01-24 14:27:43 +00:00
Lukas Wirth
41e6a8747d Lazily compute location links in type hints again 2025-01-24 15:13:10 +01:00
Lukas Wirth
433888c4b2 Record the use tree index in glob imports 2025-01-24 15:12:48 +01:00
Shoyu Vanilla
649e65ce1e Add a new failing test that overflows stack 2025-01-24 23:06:02 +09: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
0f6feb032f
Merge pull request #19017 from Veykril/push-uktrsknwmsvy
fix: Fix flycheck panicking with "once" invocation strategy
2025-01-24 13:37:17 +00:00