Frank King
879a1e5713
Lower anonymous structs or unions to HIR
2024-02-12 12:47:23 +08:00
Vadim Petrochenkov
3e8c8d8d34
hir: Add some FIXMEs for future work
2024-02-07 09:59:15 +03:00
Vadim Petrochenkov
a61019b290
hir: Remove fn opt_hir_id and fn opt_span
2024-02-07 09:38:24 +03:00
Vadim Petrochenkov
b2b5b91bfb
hir: Use InferArg in ArrayLen::Infer
2024-01-28 02:04:39 +03:00
Vadim Petrochenkov
5f8030dcc9
hir: Remove unnecessary HirId from hir::Let
...
It has 1-to-1 correspondence to its expression id.
Also remove mostly useless `visit_let_expr`.
2024-01-28 02:04:39 +03:00
Lieselotte
7889e99b55
Add PatKind::Err
2024-01-17 03:14:16 +01:00
Bryanskiy
d69cd6473c
Delegation implementation: step 1
2024-01-12 14:11:16 +03:00
Matthew Jasper
407cb24142
Remove hir::Guard
...
Use Expr instead. Use `ExprKind::Let` to represent if let guards.
2024-01-05 10:56:59 +00:00
Michael Goulet
909dd864f1
Make closures carry their own ClosureKind, rather than deducing what it is from movability
2023-12-25 16:29:15 +00:00
Michael Goulet
fc010de26b
banish hir::GenericBound::LangItemTrait
2023-12-15 16:17:27 +00:00
Deadbeef
65212a07e7
Remove #[rustc_host], use internal desugaring
2023-12-05 01:15:21 +00:00
Nadrieril
a3838c8550
Add never_patterns feature gate
2023-11-29 03:58:29 +01:00
Oli Scherer
e96ce20b34
s/generator/coroutine/
2023-10-20 21:14:01 +00:00
ezekiel
13f17e1a93
replace doc occurrences of ItemLikeVisitor
...
ItemLikeVisitor was removed, and the visit strategy was moved to `rustc_hir::intravisit`
2023-09-05 22:40:36 +02:00
bors
f88a8b71ce
Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obk
...
correctly lower `impl const` to bind to host effect param
r? `@oli-obk`
2023-08-08 19:23:41 +00:00
Deadbeef
92f4c59e48
lower impl const to bind to host effect param
2023-08-06 13:34:53 +00:00
Nilstrieb
5706be1854
Improve spans for indexing expressions
...
Indexing is similar to method calls in having an arbitrary
left-hand-side and then something on the right, which is the main part
of the expression. Method calls already have a span for that right part,
but indexing does not. This means that long method chains that use
indexing have really bad spans, especially when the indexing panics and
that span in coverted into a panic location.
This does the same thing as method calls for the AST and HIR, storing an
extra span which is then put into the `fn_span` field in THIR.
2023-08-04 13:17:39 +02:00
León Orell Valerian Liehr
9213aec762
Lower generic const items to HIR
2023-07-28 22:21:40 +02:00
Santiago Pastorino
d70deac161
Intern OpaqueTy on ItemKind::OpaqueTy
2023-06-29 14:05:10 -03:00
Maybe Waffle
ccb71ff424
hir: Add Become expression kind
2023-06-26 08:56:32 +00:00
Camille GILLOT
ca4d0d4c24
Separate AnonConst from ConstBlock in HIR.
2023-06-02 21:25:18 +00:00
DrMeepster
511e457c4b
offset_of
2023-04-21 02:14:02 -07:00
clubby789
9afffc5b61
Remove box expressions from HIR
2023-03-14 17:18:26 +00:00
Michael Goulet
c0e58c3420
Add ErrorGuaranteed to HIR ExprKind::Err
2023-02-25 19:46:36 +00:00
Michael Goulet
a772a6fc2a
Add ErrorGuaranteed to HIR TyKind::Err
2023-02-25 19:46:36 +00:00
Camille GILLOT
3175d03d3b
Take a LocalDefId in hir::Visitor::visit_fn.
2023-01-28 09:51:50 +00:00
Deadbeef
4fb10c0ce4
parse const closures
2023-01-12 02:28:37 +00:00
Nilstrieb
9067e4417e
Rename Rptr to Ref in AST and HIR
...
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already
as well.
2022-12-28 18:52:36 +01:00
Matthias Krüger
1a2f79b82c
Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514
...
Remove useless borrows and derefs
They are nothing more than noise.
<sub>These are not all of them, but my clippy started crashing (stack overflow), so rip :(</sub>
2022-12-03 17:37:42 +01:00
Matthias Krüger
c89bff29e5
Rollup merge of #104199 - SarthakSingh31:issue-97417-1, r=cjgillot
...
Keep track of the start of the argument block of a closure
This removes a call to `tcx.sess.source_map()` from [compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs](https://github.com/rust-lang/rust/compare/master...SarthakSingh31:issue-97417-1?expand=1#diff-8406bbc0d0b43d84c91b1933305df896ecdba0d1f9269e6744f13d87a2ab268a ) as required by #97417 .
VsCode automatically applied `rustfmt` to the files I edited under `src/tools`. I can undo that if its a problem.
r? `@cjgillot`
2022-12-03 17:37:41 +01:00
Maybe Waffle
f2b97a8bfe
Remove useless borrows and derefs
2022-12-01 17:34:43 +00:00
Vadim Petrochenkov
1f259ae679
rustc_hir: Change representation of import paths to support multiple resolutions
2022-12-01 18:51:05 +03:00
Vadim Petrochenkov
6cd4dd3091
rustc_hir: Relax lifetime requirements on Visitor::visit_path
2022-12-01 17:04:02 +03:00
Sarthak Singh
8f705e2425
Keep track of the start of the argument block of a closure
2022-11-28 14:09:00 +05:30
Camille GILLOT
fb7d25e978
Separate lifetime ident from resolution in HIR.
2022-11-23 19:33:06 +00:00
Camille GILLOT
9d20aca983
Store a LocalDefId in hir::Variant & hir::Field.
2022-11-13 14:06:51 +00:00
Camille GILLOT
290f0781b4
Store LocalDefId in hir::Closure.
2022-11-13 14:04:02 +00:00
Santiago Pastorino
ba18f16e81
Add visit_fn_ret_ty to hir intravisit
2022-11-03 10:41:22 -03:00
Samuel Moelius
e604327286
Reorder walk_ functions in intravisit.rs
2022-11-01 19:02:45 -04:00
Yuki Okushi
2125181b7d
Rollup merge of #103692 - smoelius:walk_generic_arg, r=fee1-dead
...
Add `walk_generic_arg`
Could this please be added?
I could use it for a Clippy lint.
2022-11-01 12:03:41 +09:00
Nicholas Nethercote
c8c25ce5a1
Rename some OwnerId fields.
...
spastorino noticed some silly expressions like `item_id.def_id.def_id`.
This commit renames several `def_id: OwnerId` fields as `owner_id`, so
those expressions become `item_id.owner_id.def_id`.
`item_id.owner_id.local_def_id` would be even clearer, but the use of
`def_id` for values of type `LocalDefId` is *very* widespread, so I left
that alone.
2022-10-29 20:28:38 +11:00
Samuel Moelius
86a4009586
Add walk_generic_arg
2022-10-28 10:36:42 -04:00
Michael Goulet
70f3c79c50
ImplItemKind::TyAlias => ImplItemKind::Type
2022-10-09 07:09:57 +00:00
Camille GILLOT
337a73da6e
Do not overwrite binders for another HirId.
2022-09-27 18:58:37 +02:00
Nicholas Nethercote
7e3fd33a66
Remove unused argument from visit_poly_trait_ref.
2022-09-12 13:51:10 +10:00
Nicholas Nethercote
9ec5bda0dc
Remove unused span argument from visit_name.
2022-09-12 13:44:29 +10:00
Nicholas Nethercote
925363f13d
Remove unused span argument from walk_fn.
2022-09-12 13:24:27 +10:00
Nicholas Nethercote
6568ef338e
Remove path_span argument to the visit_path_segment methods.
...
The `visit_path_segment` method of both the AST and HIR visitors has a
`path_span` argument that isn't necessary. This commit removes it.
There are two very small and inconsequential functional changes.
- One call to `NodeCollector::insert` now is passed a path segment
identifier span instead of a full path span. This span is only used in
a panic message printed in the case of an internal compiler bug.
- Likewise, one call to `LifetimeCollectVisitor::record_elided_anchor`
now uses a path segment identifier span instead of a full path span.
This span is used to make some `'_` lifetimes.
2022-09-12 13:24:25 +10:00
Camille GILLOT
05812df603
Handle generic parameters.
2022-09-09 01:31:46 +00:00
Michael Goulet
78b962a4f3
RPITIT placeholder items
2022-09-09 01:31:44 +00:00