Alan Egerton
430c4ab7ff
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Kyle Matsuda
98c4a49db8
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
2023-02-16 17:05:56 -07:00
Kyle Matsuda
f0565c939e
change usages of type_of to bound_type_of
2023-02-16 17:01:52 -07:00
Camille GILLOT
e41c37316d
Add of_trait
to DefKind::Impl.
2023-02-14 19:55:44 +00:00
bors
79475f56ec
Auto merge of #107206 - cjgillot:no-h2l-map, r=WaffleLapkin
...
Remove HirId -> LocalDefId map from HIR.
Having this map in HIR prevents the creating of new definitions after HIR has been built.
Thankfully, we do not need it.
Based on https://github.com/rust-lang/rust/pull/103902
2023-01-28 16:11:33 +00:00
Camille GILLOT
3e32533cc2
Remove HirId -> LocalDefId
map from HIR.
2023-01-28 09:55:26 +00:00
Camille GILLOT
92c4f1e2d9
Take a LocalDefId in hir::Visitor::visit_fn.
2023-01-28 09:51:50 +00:00
Scott McMurray
e65a7ff0b3
Remove from librustdoc and clippy too
2023-01-27 20:44:19 -08:00
Philipp Krones
5c7a65251a
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
2023-01-27 21:09:08 +01:00
Kyle Matsuda
afb586fa1f
change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add EarlyBinder to fn_sig in metadata
2023-01-26 20:28:25 -07:00
Kyle Matsuda
38899d0c29
replace usages of fn_sig query with bound_fn_sig
2023-01-26 20:15:36 -07:00
Philipp Krones
d21616737b
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
2023-01-12 19:48:13 +01:00
Michael Goulet
70f6c478f6
get_parent and find_parent
2023-01-04 00:43:13 +00:00
Michael Goulet
73d293fb6d
rename get_parent_node to parent_id
2023-01-04 00:43:13 +00:00
Nilstrieb
c617a8e01c
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
Philipp Krones
1c422524c7
Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup
2022-12-17 14:12:54 +01:00
Nicholas Nethercote
e723fc4f56
Merge SimplifiedTypeGen<D>
into SimplifiedType
.
...
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't
need the generic parameter.
2022-12-15 15:13:19 +11:00
Philipp Krones
d05e2865a0
Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup
2022-12-01 18:29:38 +01:00
Philipp Krones
46c5a5d234
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
2022-11-21 20:51:52 +01:00
bors
80a4699aae
Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compiler-errors
...
Minimal implementation of implicit deref patterns for Strings
cc `@compiler-errors` `@BoxyUwU` https://github.com/rust-lang/lang-team/issues/88 #87121
~~I forgot to add a feature gate, will do so in a minute~~ Done
2022-11-20 07:16:42 +00:00
Michael Goulet
3a2eaa73f4
drive-by: Add is_async fn to hir::IsAsync
2022-11-19 02:22:24 +00:00
Deadbeef
a09423f8c8
Rm diagnostic item, use lang item
2022-11-18 06:16:20 +00:00
Cameron Steffen
16566e97fd
Use LanguageItems::require less
2022-10-29 16:04:10 -05:00
Nicholas Nethercote
efca32e23a
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
flip1995
cd0bb7de01
Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup
2022-10-23 15:18:45 +02:00
lcnr
059e52b96b
rustc_hir_typeck: fix clippy
2022-10-20 17:53:14 +02:00
Guillaume Gomez
c3f077c7ad
Fix unclosed HTML tag in clippy doc
2022-10-10 20:45:04 +02:00
Philipp Krones
d75b25faab
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
2022-10-06 09:44:38 +02:00
Nicholas Nethercote
8b59fe4981
Shrink hir::def::Res
.
...
`Res::SelfTy` currently has two `Option`s. When the second one is `Some`
the first one is never consulted. So we can split it into two variants,
`Res::SelfTyParam` and `Res::SelfTyAlias`, reducing the size of `Res`
from 24 bytes to 12. This then shrinks `hir::Path` and
`hir::PathSegment`, which are the HIR types that take up the most space.
2022-09-29 08:44:52 +10:00
lcnr
e5ce6d18df
rustc_typeck to rustc_hir_analysis
2022-09-27 10:37:23 +02:00
Pietro Albini
06568fd6c7
remove cfg(bootstrap)
2022-09-26 10:14:45 +02:00
Takayuki Maeda
ea75178219
separate definitions and HIR
owners
...
fix a ui test
use `into`
fix clippy ui test
fix a run-make-fulldeps test
implement `IntoQueryParam<DefId>` for `OwnerId`
use `OwnerId` for more queries
change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24 23:21:19 +09:00
est31
2be8b73328
Fix clippy
2022-09-15 21:21:18 +02:00
Nicholas Nethercote
308153563b
Remove unused span argument from visit_name
.
2022-09-12 13:44:29 +10:00
Philipp Krones
98bf99e2f8
Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup
2022-09-09 13:36:26 +02:00
Nicholas Nethercote
c86a9c077c
Introduce DotDotPos
.
...
This shrinks `hir::Pat` from 88 to 72 bytes.
2022-09-08 15:25:50 +10:00
bors
ce339b219a
Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot
...
`BindingAnnotation` refactor
* `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`)
* `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)`
* Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}`
One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`.
I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-06 03:16:29 +00:00
Takayuki Maeda
4bcaddeeb2
separate the receiver from arguments in HIR under /clippy
2022-09-05 22:25:57 +09:00
Dylan DPC
9ae329232b
Rollup merge of #101142 - nnethercote:improve-hir-stats, r=davidtwco
...
Improve HIR stats
#100398 improve the AST stats collection done by `-Zhir-stats`. This PR does the same for HIR stats collection.
r? `@davidtwco`
2022-09-05 14:15:51 +05:30
Cameron Steffen
e5f30f4dfa
clippy: BindingAnnotation change
2022-09-02 13:03:11 -05:00
Jason Newcomb
fb41bfa774
Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup
2022-08-31 09:24:45 -04:00
Nilstrieb
ce847beb47
Revert let_chains stabilization
...
This reverts commit 326646074940222d602f3683d0559088690830f4.
This is the revert against master, the beta revert was already done in #100538 .
2022-08-29 19:34:11 +02:00
Nicholas Nethercote
3ce109e12d
Use &'hir Ty
everywhere.
...
For consistency, and because it makes HIR measurement simpler and more
accurate.
2022-08-29 06:35:14 +10:00
Nicholas Nethercote
3b80e994d5
Use &'hir Expr
everywhere.
...
For consistency, and because it makes HIR measurement simpler and more
accurate.
2022-08-29 06:35:14 +10:00
Nicholas Nethercote
6e5f90ae46
Shrink ast::Attribute
.
2022-08-16 11:10:13 +10:00
Mark Rousskov
1a3192a331
Adjust cfgs
2022-08-12 16:28:15 -04:00
Philipp Krones
dc29cfb8d5
Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup
2022-08-11 19:42:16 +02:00
Dylan DPC
72649cf2a6
Rollup merge of #99186 - camsteffen:closure-localdefid, r=cjgillot
...
Use LocalDefId for closures more
2022-07-31 17:36:40 +05:30
Cameron Steffen
62907727af
Use LocalDefId for closures more
2022-07-30 15:59:17 -05:00
Miguel Guarniz
ce5fa10cce
Change enclosing_body_owner to return LocalDefId
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 18:26:10 -04:00