34102 Commits

Author SHA1 Message Date
Lukas Wirth
4fdc2507c6 fix: Fix invalid signature bitflags 2025-04-10 15:39:27 +02:00
Lukas Wirth
f880acd18c
Merge pull request #19461 from Hmikihiro/shadow_by_module
fix: shadow type by module
2025-04-10 12:20:14 +00:00
Lukas Wirth
062205fd36
Merge pull request #19555 from Urgau/patch-1
Enable `[canonicalize-issue-links]` and `[no-mentions]` in triagebot
2025-04-10 11:48:47 +00:00
Lukas Wirth
55efab890b
Merge pull request #19559 from ChayimFriedman2/rust-186
internal: Switch to Rust 1.86.0
2025-04-10 08:33:14 +00:00
Chayim Refael Friedman
8a9a1e3345 Remove all upcasts!
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
Chayim Refael Friedman
a775d21112 Update MSRV to Rust 1.86.0 2025-04-10 11:06:09 +03:00
Hayashi Mikihiro
2bdb2292d8 Update crates/hir-def/src/resolver.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
b75a3388f1 Update crates/hir-def/src/resolver.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
1b471ebfd5 TypeNs contain module
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
a7dc60a2c4 return single option
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
2854ad9a41 fix: shadow type by module
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Chayim Refael Friedman
7b21fd6f85
Merge pull request #19558 from rust-lang/small-bug-catastrophic-effect
fix: Fix a small bug with catastrophic effects
2025-04-10 06:48:50 +00:00
Chayim Refael Friedman
2ae3e4c879
Fix a small bug with catastrophic effects
The tiny bug was that `FnFlags::DEPRECTAED_SAFE_2024` and `FnFlags::RUSTC_ALLOW_INCOHERENT_IMPLS` were assigned the same value.

The catastrophic effect was that every function marked as `#[rustc_allow_incoherent_impl]` was considered safe-deprecated for edition 2024, which caused it to be considered unsafe to call when called from edition 2024. And that includes `<[_]>::into_vec()`, which is called by the `vec![]` macro. So, catastrophic effect.

This innocent-looking bug probably arose from the item tree rewrite. No review would've catch that!
2025-04-10 09:37:37 +03:00
Urgau
f1d9795639
Enable [canonicalize-issue-links] and [no-mentions] in triagebot 2025-04-09 22:15:51 +02:00
David Barsky
432a3bca90
Merge pull request #19553 from davidbarsky/davidbarsky/fix-rustdoc-tests
internal: fix `NameGenerator`'s and `AnyMap`'s rustdocs
2025-04-09 16:56:31 +00:00
Laurențiu Nicola
a556f72735
Merge pull request #19554 from davidbarsky/davidbarsky/rename-children-modules-to-child-modules
internal: rename `children_modules` to `child_modules`
2025-04-09 16:55:23 +00:00
David Barsky
3e15dbc85f internal: fix NameGenerator's and AnyMap's rustdocs 2025-04-09 12:44:52 -04:00
David Barsky
99a2b676bc internal: rename children_modules to child_modules 2025-04-09 12:43:49 -04:00
Lukas Wirth
a05564370d
Merge pull request #19550 from Veykril/push-rsskztqzwuzk
refactor: Turn `LifetimeRef` into an enum
2025-04-09 14:09:59 +00:00
Lukas Wirth
07212140db refactor: Turn LifetimeRef into an enum
This makes things more structured
2025-04-09 15:58:06 +02:00
Lukas Wirth
f4747f2617
Merge pull request #19255 from geetanshjuneja/master
Add children modules feature
2025-04-09 09:53:25 +00:00
Lukas Wirth
dc363f7f77
Merge pull request #19462 from Veykril/push-ypvprvvwkyll
refactor: Lower type-refs before type inference
2025-04-09 08:54:28 +00:00
Lukas Wirth
1fd9520c92 refactor: Lower type-refs before type inference
This refactors how we deal with items in hir-def lowering.

- It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures.
- We now uniformly lower type AST into TypeRefs before type inference.
- Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion.
- Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-09 10:43:23 +02:00
David Barsky
f3f6b5f4f1
Merge pull request #19536 from jackh726/closure-infer
Port closure inference from rustc
2025-04-08 14:17:30 +00:00
Lukas Wirth
fa53aab6f1
Merge pull request #19541 from Veykril/push-twqrorwqzmwv
fix(auto-import): Prefer imports of matching types for argument lists
2025-04-08 07:32:52 +00:00
Lukas Wirth
7255ef1375 fix(auto-import): Prefer imports of matching types for argument lists 2025-04-08 09:21:32 +02:00
jackh726
bc3e9d9fcb Port closure inference from rustc 2025-04-07 21:48:01 +00:00
geetanshjuneja
8f6d32cf62 cargo xtask tidy 2025-04-07 21:41:26 +05:30
geetanshjuneja
1f7c3e8b92 added children modules 2025-04-07 21:14:01 +05:30
Lukas Wirth
c5882732e6
Merge pull request #19425 from ConradIrwin/drop-drop-glue-goo
Tidy up drop glue notification
2025-04-07 10:32:50 +00:00
Lukas Wirth
33c3f67764
Merge pull request #19511 from snprajwal/fixmes
chore: clean up some FIXMEs
2025-04-07 10:30:46 +00:00
Lukas Wirth
a2783704bf
Merge pull request #19432 from ShoyuVanilla/issue-19431
fix: Yet another false positive invalid cast diagnostic
2025-04-07 10:29:54 +00:00
Lukas Wirth
6832c5a961
Merge pull request #19512 from BenjaminBrienen/update-stdx
Upstream stdx changes
2025-04-07 07:14:01 +00:00
BenjaminBrienen
428ee50540 upstream stdx changes 2025-04-06 23:55:12 +02:00
Lukas Wirth
588948f267
Merge pull request #19533 from Veykril/push-zxlpwkvzxzws
chore: Set up a proper job matrix for rust-cross
2025-04-07
2025-04-06 08:50:51 +00:00
Lukas Wirth
a1f49124ee chore: Set up a proper job matrix for rust-cross 2025-04-06 10:39:49 +02:00
Lukas Wirth
7e00f91a72
Merge pull request #19531 from Veykril/push-kxyrpznnllkx
fix: Fix `format_args` lowering for >=1.87
2025-04-06 08:18:23 +00:00
Lukas Wirth
e7ce86ddea fix: Fix format_args lowering for >=1.87 2025-04-06 10:05:56 +02:00
Lukas Wirth
bec545920a
Merge pull request #19447 from Natural-selection1/add_impl_for
add more completion about "impl"
2025-04-05 13:01:51 +00:00
Lukas Wirth
1d1771c15f
Merge pull request #19501 from ChayimFriedman2/macro-expansion
fix: Fix a bug in MBE expansion that arose from incorrect fixing of an older bug in MBE
2025-04-05 13:00:30 +00:00
Laurențiu Nicola
94c33840cc
Merge pull request #19526 from SOF3/patch-1
The rustdoc file prefix for constants is "constant" not "const"
2025-04-05 10:34:37 +00:00
Jonathan Chan Kwan Yin
1428aa9b6f
the rustdoc file prefix for constants is "constant" not "const" 2025-04-05 18:16:39 +08:00
Lukas Wirth
55c8cdeafb
Merge pull request #19519 from snprajwal/project-control-no-deps
feat(project-model): provide flag for no deps
2025-04-04 16:50:27 +00:00
David Barsky
16a72506a4
Merge pull request #19523 from davidbarsky/davidbarsky/fix-salsafied-crate-graph-with-lazy-project-discovery
internal: ensure a Salsa-ified crate graph works with project discovery
2025-04-04 16:29:20 +00:00
David Barsky
9aa99eec60 internal: fix salsa-ified crate graph working with lazy project discovery 2025-04-04 12:14:55 -04:00
Lukas Wirth
2261e4e892
Merge pull request #19522 from davidbarsky/davidbarsky/fix-panic-in-view-crate-graph
internal: fix panic in `view_crate_graph`
2025-04-04 16:00:18 +00:00
Lukas Wirth
8b6621a138
Merge pull request #19515 from jrmuizel/multiple-definitions
fix: don't drop references with more than one definition.
2025-04-04 15:50:33 +00:00
Lukas Wirth
afcb45e003
Merge pull request #19520 from BenjaminBrienen/defaultnew
Align usage of `default` and `new` with style guide
2025-04-04 15:42:16 +00:00
David Barsky
069de21793 internal: fix panic in view_crate_graph 2025-04-04 11:38:19 -04:00
Jeff Muizelaar
e9d997e97d fix: don't drop references with more than one definition.
Implicit field references during struct initialization were
being dropped because get_definition was returning None because
there were multiple definitions.

This adds a new helper, `get_defintions`, that supports returning
more than one definition for a given token and hooks it up.

Fixes #19393
2025-04-04 11:37:14 -04:00