summary refs log tree commit diff
path: root/compiler/rustc_middle/src/hir/map
AgeCommit message (Collapse)AuthorLines
2022-09-12Auto merge of #101688 - cjgillot:verify-hir-parent, r=petrochenkovbors-0/+2
Assert that HIR nodes are not their own parent. Fixes https://github.com/rust-lang/rust/issues/101505. Replaces #101513 r? `@petrochenkov` `@nnethercote`
2022-09-11Assert that HIR nodes are not their own parent.Camille GILLOT-0/+2
2022-09-09Handle generic parameters.Camille GILLOT-4/+14
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+2
2022-08-31Use parent_iter instead of a find_parent_node loopEric Holk-0/+3
2022-08-29Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errorsDylan DPC-2/+6
Remove separate indexing of early-bound regions ~Based on https://github.com/rust-lang/rust/pull/99728.~ This PR copies some modifications from https://github.com/rust-lang/rust/pull/97839 around object lifetime defaults. These modifications allow to stop counting generic parameters during lifetime resolution, and rely on the indexing given by `rustc_typeck::collect`.
2022-08-27Rollup merge of #101057 - cjgillot:one-fn-sig, r=compiler-errorsYuki Okushi-24/+2
Merge implementations of HIR fn_decl and fn_sig.
2022-08-26Merge implementations of HIR fn_decl and fn_sig.Camille GILLOT-24/+2
2022-08-22Auto merge of #99963 - cjgillot:iter-submodule, r=compiler-errorsbors-19/+13
Simplify implementation for par_for_each_module
2022-08-11Check attributes on struct expression fields.Eric Huss-0/+3
Attributes on struct expression fields were not being checked for validity. This adds the fields as HIR nodes so that `CheckAttrVisitor` can visit those nodes to check their attributes.
2022-08-11Check attributes on pattern fields.Eric Huss-0/+3
Attributes on pattern struct fields were not being checked for validity. This adds the fields as HIR nodes so that the `CheckAttrVisitor` can visit those nodes to check their attributes.
2022-08-03Create a specific `ObjectLifetimeDefault` enum.Camille GILLOT-2/+6
2022-07-30Inline a few short methods.Camille GILLOT-0/+9
2022-07-30Simplify implementation for par_for_each_module.Camille GILLOT-19/+4
2022-07-29Change enclosing_body_owner to return LocalDefIdMiguel Guarniz-4/+4
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Change maybe_body_owned_by to take local def idMiguel Guarniz-7/+8
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-19use `par_for_each_in` in `par_body_owners` and `collect_crate_mono_items`SparrowLii-3/+1
2022-07-15Auto merge of #98203 - kckeiks:gather-body-owners-in-hir-item-queries, ↵bors-113/+104
r=cjgillot gather body owners Issue #96341
2022-07-14Auto merge of #99231 - Dylan-DPC:rollup-0tl8c0o, r=Dylan-DPCbors-5/+7
Rollup of 5 pull requests Successful merges: - #97720 (Always create elided lifetime parameters for functions) - #98315 (Stabilize `core::ffi:c_*` and rexport in `std::ffi`) - #98705 (Implement `for<>` lifetime binder for closures) - #99126 (remove allow(rustc::potential_query_instability) in rustc_span) - #99139 (Give a better error when `x dist` fails for an optional tool) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-1/+1
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-13collect module item-likes in visit_itemsMiguel Guarniz-7/+10
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-13merge visitors in queriesMiguel Guarniz-135/+75
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-13inline associated_bodyMiguel Guarniz-20/+5
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-13use gathered body_owners in par_body_ownersMiguel Guarniz-13/+2
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-12Add an indirection for closures in `hir::ExprKind`Maybe Waffle-5/+7
This helps bring `hir::Expr` size down, `Closure` was the biggest variant, especially after `for<>` additions.
2022-07-08Auto merge of #98482 - cjgillot:short-struct-span-closure, r=estebankbors-0/+1
Shorten def_span of closures to just their header Continuation of https://github.com/rust-lang/rust/pull/93967.
2022-07-07Auto merge of #99024 - matthiaskrgr:rollup-8ygpcpg, r=matthiaskrgrbors-29/+37
Rollup of 9 pull requests Successful merges: - #97917 (Implement ExitCodeExt for Windows) - #98844 (Reword comments and rename HIR visiting methods.) - #98979 (interpret: use AllocRange in UninitByteAccess) - #98986 (Fix missing word in comment) - #98994 (replace process exit with more detailed exit in src/bootstrap/*.rs) - #98995 (Add a test for #80471) - #99002 (suggest adding a derive for #[default] applied to variants) - #99004 (Add a test for #70408) - #99017 (Replace boolean argument for print_where_clause with an enum to make code more clear) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-07Auto merge of #95573 - cjgillot:lower-query, r=michaelwoeristerbors-34/+28
Make lowering a query Split from https://github.com/rust-lang/rust/pull/88186. This PR refactors the relationship between lowering and the resolver outputs in order to make lowering itself a query. In a first part, lowering is changed to avoid modifying resolver outputs, by maintaining its own data structures for creating new `NodeId`s and so. Then, the `TyCtxt` is modified to allow creating new `LocalDefId`s from inside it. This is done by: - enclosing `Definitions` in a lock, so as to allow modification; - creating a query `register_def` whose purpose is to declare a `LocalDefId` to the query system. See `TyCtxt::create_def` and `TyCtxt::iter_local_def_id` for more detailed explanations of the design.
2022-07-07Reword comments and rename HIR visiting methods.Camille GILLOT-29/+37
2022-07-07Shorten span for closures.Camille GILLOT-0/+1
2022-07-06record LocalDefId of closureMiguel Guarniz-8/+4
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-06gather body ownersMiguel Guarniz-16/+94
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-06Allow to create definitions inside the query system.Camille GILLOT-34/+28
2022-07-06Rollup merge of #98519 - TaKO8Ki:add-head-span-field-to-item-and-impl-item, ↵Guillaume Gomez-1/+2
r=cjgillot Replace some `guess_head_span` with `def_span` This patch fixes a part of #97417. r? `@cjgillot`
2022-07-06use `named_span` in case of tuple variantTakayuki Maeda-6/+1
2022-07-06add `Node::Variant` to `Map::opt_span`Takayuki Maeda-1/+7
2022-07-06Rollup merge of #98881 - cjgillot:q-def-kind, r=fee1-deadDylan DPC-1/+2
Only compute DefKind through the query.
2022-07-06Fix double spacefee1-dead-1/+1
2022-07-04Only compute DefKind through the query.Camille GILLOT-1/+2
2022-07-02Rollup merge of #98639 - camsteffen:no-node-binding, r=compiler-errorsDylan DPC-4/+1
Factor out `hir::Node::Binding`
2022-07-01Shorten def_span for more items.Camille GILLOT-30/+90
2022-07-01Factor out hir::Node::BindingCameron Steffen-4/+1
2022-06-21Only keep a single well-formed query.Camille GILLOT-17/+4
2022-06-18Auto merge of #98153 - nnethercote:fix-MissingDoc-quadratic-behaviour, ↵bors-4/+3
r=cjgillot Fix `MissingDoc` quadratic behaviour Best reviewed one commit at a time. r? `@cjgillot`
2022-06-17Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoeristerbors-8/+9
Split up `Definitions` and `ResolverAstLowering`. Split off https://github.com/rust-lang/rust/pull/95573 r? `@michaelwoerister`
2022-06-16Remove unused `hir_id` arg from `visit_attribute`.Nicholas Nethercote-4/+3
2022-06-15Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011Yuki Okushi-5/+5
Make `ExprKind::Closure` a struct variant. Simple refactor since we both need it to introduce additional fields in `ExprKind::Closure`. r? ``@Aaron1011``
2022-06-14Separate `source_span` and `expn_that_defined` from `Definitions`.Camille GILLOT-2/+3
2022-06-14Separate Definitions and CrateStore from ResolverOutputs.Camille GILLOT-6/+6
2022-06-12Make `ExprKind::Closure` a struct variant.Camille GILLOT-5/+5