22023 Commits

Author SHA1 Message Date
Shoyu Vanilla
f06f1b81bb Migrate some leftovers in add_missing_match_arms 2025-02-24 22:41:52 +09:00
Lukas Wirth
e2c281aaae
Merge pull request #19219 from Veykril/push-rvosplwpwqqt
Vendor `always-assert` into `stdx`
2025-02-24 13:15:39 +00:00
Lukas Wirth
b0380dbfbc
Merge pull request #19211 from Timmmm/user/timh/import_private
Include private items in completions for local crates
2025-02-24 13:13:31 +00:00
Lukas Wirth
f63f845783
Merge pull request #19197 from andylokandy/insta
feat: update insta inline snapshot when clicking 'Update Test' runnable
2025-02-24 13:11:45 +00:00
Lukas Wirth
9a462b7c36 Vendor always-assert 2025-02-24 14:00:34 +01:00
Laurențiu Nicola
f641813e07 Format code 2025-02-24 10:28:46 +02:00
Laurențiu Nicola
a5bf2d5604 Add rustc_hashes and bump the others 2025-02-24 10:10:51 +02:00
Laurențiu Nicola
807aa45e0a Merge from rust-lang/rust 2025-02-24 09:42:57 +02:00
Lukas Wirth
6d68c475c7
Merge pull request #19191 from Veykril/push-yzzlosskwrxs
Remove `limit` crate in favor `usize`
2025-02-23 16:50:32 +00:00
Lukas Wirth
0b2e8166a1 Remove limit crate in favor usize 2025-02-23 17:35:09 +01:00
Tim Hutt
8d91f1cc17 Include private items in completions for local crates
Don't filter out private items when completing paths in the same crate. Instead respect the `privateEditable` setting.

Fixes #9850
2025-02-23 13:25:53 +00:00
niller-g
18d6e281b3 Fix codegen of parser inline tests runner
When running `cargo codegen` the `crates/parser/test_data/generated/runner.rs` file is only updated when some file in `crates/parser/test_data/inline` changes. However this is not sufficient in all cases
2025-02-23 11:41:34 +01:00
Jacob Pratt
001a4019df
Rollup merge of #137334 - compiler-errors:edition-2024-fresh-2, r=saethlin,traviscross
Greatly simplify lifetime captures in edition 2024

Remove most of the `+ Captures` and `+ '_` from the compiler, since they are now unnecessary with the new edition 2021 lifetime capture rules. Use some `+ 'tcx` and `+ 'static` rather than being overly verbose with precise capturing syntax.
2025-02-23 02:44:18 -05:00
Michael Goulet
fb3a49ed55 Greatly simplify lifetime captures in edition 2024 2025-02-22 22:24:52 +00:00
Chayim Refael Friedman
9df88ff0f6
Merge pull request #19182 from ShoyuVanilla/issue-19177
fix: Binding wrong associated type when lowering bounds like `T: Trait<Assoc = U>`
2025-02-22 21:32:46 +00:00
Shirayama Kazatsuyu
64a869c714 Allow "package/feature" format feature flag 2025-02-22 22:27:30 +09:00
Laurențiu Nicola
a7547a473b Switch back to RUST_SRC_PATH 2025-02-22 09:07:52 +02:00
andylokandy
b59b04ffe2 fix 2025-02-21 21:31:23 +08:00
andylokandy
03c24d7c28 feat: update insta inline snapshot when clicks 'Update Test' runnable 2025-02-21 21:18:20 +08:00
Jubilee Young
eb4c00e9c7 rust-analyzer: use new function in (incorrect) layout computation
This is only to fix the build.
2025-02-20 19:55:29 -08:00
Zachary S
8aba4e6dcb Remove BackendRepr::Uninhabited, replaced with an uninhabited: bool field in LayoutData.
Also update comments that refered to BackendRepr::Uninhabited.
2025-02-20 13:27:32 -06:00
Lukas Wirth
88bc40aac0
Merge pull request #19189 from Veykril/push-qutznxznnwqn
minor: Improve unset `OUT_DIR` error message
2025-02-20 18:15:29 +00:00
Lukas Wirth
6b32c8329f Improve unset OUT_DIR error message 2025-02-20 19:00:23 +01:00
Lukas Wirth
6265c53132
Merge pull request #19151 from infiniteregrets/infi/fix-proc-macro
Use correct working directory for non-workspace proc-macro execution
2025-02-20 16:04:52 +00:00
Shoyu Vanilla
a82773ab48 Explicitly compare TypesMap as ptrs 2025-02-20 08:49:00 +09:00
Shoyu Vanilla
9d459e8de7 fix: Binding wrong assoc ty when lowering trait ref bound 2025-02-20 00:47:21 +09:00
Ali Bektas
9d5a97368a Add a check_assist_* overload and move tests under assists 2025-02-18 21:58:27 +01:00
Ali Bektas
fc10fe44de Fix 19090 2025-02-18 20:51:42 +01:00
Lukas Wirth
6543225ad9
Revert "pass struct fields to chalk" 2025-02-18 11:37:43 +01:00
Matthias Krüger
447b34760d
Rollup merge of #137173 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-02-17 17:06:14 +01:00
Mehul Arora
3a31741627 Use correct working directory for non-workspace proc-macro execution 2025-02-17 10:36:32 -05:00
Laurențiu Nicola
cba236d9b7
Merge pull request #19169 from lnicola/sync-from-rust
minor: Sync from downstream
2025-02-17 12:30:13 +00:00
Lukas Wirth
656daef4da
Merge pull request #19167 from ChayimFriedman2/fix-ref-pat
fix: Fix detection of ref patterns for path patterns
2025-02-17 11:23:18 +00:00
Laurențiu Nicola
bec6d6fbe3 Merge from rust-lang/rust 2025-02-17 13:20:12 +02:00
bors
2ac072e546 Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #137095 (Replace some u64 hashes with Hash64)
 - #137100 (HIR analysis: Remove unnecessary abstraction over list of clauses)
 - #137105 (Restrict DerefPure for Cow<T> impl to T = impl Clone, [impl Clone], str.)
 - #137120 (Enable `relative-path-include-bytes-132203` rustdoc-ui test on Windows)
 - #137125 (Re-add missing empty lines in the releases notes)
 - #137145 (use add-core-stubs / minicore for a few more tests)
 - #137149 (Remove SSE ABI from i586-pc-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-17 11:18:33 +00:00
Chayim Refael Friedman
eb69d3734c Fix detection of ref patterns for path patterns
I was wrong on #19127, I thought hir-def resolver is enough for them, but it turns out not because of paths like `<Enum>::Variant` and `Type::AssocThatIsEnum::Variant`.
2025-02-17 11:51:29 +02:00
Lukas Wirth
a3f937fc24
Merge pull request #19158 from PoignardAzur/expaned_pub_glob_imports
Implement expand_glob_reexport assist
2025-02-17 09:46:29 +00:00
Lukas Wirth
efdfdc448b
Merge pull request #19122 from Austaras/master
pass struct fields to chalk
2025-02-17 09:37:55 +00:00
Lukas Wirth
09db657439
Merge pull request #19127 from ChayimFriedman2/different-generic-args
feat: Refactor path lowering and serve a new path diagnostic
2025-02-17 08:30:10 +00:00
Chayim Refael Friedman
100e166bb1 Calculate drop glue and show it on hover
Also fix the `needs_drop()` intrinsic.

Unions also need this information (to err if they have a drop-needing field), but this will come in a follow-up PR.
2025-02-17 06:29:37 +02:00
Chayim Refael Friedman
353616be8b Fix sorting of runnables
There were two mistakes: first, tests were sorted before test modules, and second, we re-sorted based on the name only, which cancelled the sort based on the kind.
2025-02-17 03:03:29 +02:00
Nicholas Nethercote
610f4c4046 Rename pattern_complexity attr as pattern_complexity_limit.
For consistency with `recursion_limit`, `move_size_limit`, and
`type_length_limit`.
2025-02-17 09:30:40 +11:00
Nicholas Nethercote
30bcf2a6b5 Add pattern_complexity_limit to Limits.
It's similar to the other limits, e.g. obtained via `get_limit`. So it
makes sense to handle it consistently with the other limits. We now use
`Limit`/`usize` in most places instead of `Option<usize>`, so we use
`Limit::new(usize::MAX)`/`usize::MAX` to emulate how `None` used to work.

The commit also adds `Limit::unlimited`.
2025-02-17 09:30:33 +11:00
Ben Kimock
b4b1e778c9 Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
Chayim Refael Friedman
55c04ab371 Refactor path lowering
And add a new diagnostic for non-`Fn` parenthesized generic args.

Path lowering started to look like a mess, with each function carrying additional parameters for the diagnostic callback (since paths can occur both in type and in expression/pattern position, and their diagnostic handling is different) and the segment index, for the diagnostics report. So I refactored it from stateless functions on `TyLoweringContext` into stateful struct, `PathLoweringContext`, that tracks the process of lowering a path from resolution til assoc types selection.
2025-02-16 19:44:50 +02:00
Lukas Wirth
2b485d7f23
Merge pull request #19137 from asuto15/highlight-extern-crate
fix: highlight `extern crate` in doc comments
2025-02-16 14:07:07 +00:00
Lukas Wirth
5ec9d9fd5f
Merge pull request #19155 from ShoyuVanilla/migrate-missing-match-arms
internal: Remove mutable syntax tree usages from `add_missing_match_arms` assist
2025-02-16 14:06:45 +00:00
Lukas Wirth
1afbc220bc fix: Stabilize sort order of related_tests 2025-02-16 13:18:47 +01:00
Lukas Wirth
b332a053e0
Merge pull request #19161 from Veykril/push-prmuyxlnxzxo
fix: Improve sort order of runnables
2025-02-16 11:37:52 +00:00
Lukas Wirth
e0d1fba739 fix: Stabilize sort order of runnables 2025-02-16 12:22:26 +01:00