about summary refs log tree commit diff
path: root/src/librustc/query
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1261/+0
2020-03-25Rollup merge of #69700 - anyska:layout-details-rename, r=oli-obkDylan DPC-1/+1
Rename LayoutDetails to just Layout.
2020-03-25Rename LayoutDetails to just Layout.Ana-Maria Mihalache-1/+1
2020-03-24improve normalize cycle errorBastian Kauschke-1/+1
2020-03-23query normalize_generic_arg_after_erasing_regionsBastian Kauschke-4/+4
2020-03-21Allow `hir().find` to return `None`John Kåre Alsaker-2/+2
2020-03-19rustc/query: tweak comments on hir_owner{,_nodes}.Eduard-Mihai Burtescu-4/+5
2020-03-19hir: replace "items" terminology with "nodes" where appropriate.Eduard-Mihai Burtescu-5/+5
2020-03-19rustc: use LocalDefId instead of DefIndex in HirId.Eduard-Mihai Burtescu-8/+12
2020-03-19rustc: use LocalDefId instead of DefIndex for query keys.Eduard-Mihai Burtescu-5/+5
2020-03-14Add some comments to the new queriesJohn Kåre Alsaker-0/+13
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-1/+1
2020-03-14Update `trait_impls`John Kåre Alsaker-0/+3
2020-03-14Update `visit_item_likes_in_module`John Kåre Alsaker-0/+4
2020-03-14Create Map after TyCtxtJohn Kåre Alsaker-0/+6
2020-03-14Add HIR queriesJohn Kåre Alsaker-0/+8
2020-03-09Remove the `no_force` query attributeJohn Kåre Alsaker-38/+0
2020-03-09Remove the need for `no_force`John Kåre Alsaker-1/+1
2020-03-09Move `analysis` to the query macroJohn Kåre Alsaker-0/+5
2020-03-06Auto merge of #69614 - estebank:ice-age, r=davidtwcobors-1/+1
`delay_span_bug` when codegen cannot select obligation Fix #69602, introduced in #60126 by letting the compiler continue past type checking after encountering errors.
2020-03-02Remove chalk integrationCAD97-10/+0
2020-03-01`delay_span_bug` when codegen cannot select obligationEsteban Küber-1/+1
Fix #69602, introduced in #60126 by letting the compiler continue past type checking after encountering errors.
2020-03-01Auto merge of #69380 - Zoxc:parent-module, r=michaelwoeristerbors-0/+4
Use a query to get parent modules Split out from https://github.com/rust-lang/rust/pull/69015 / https://github.com/rust-lang/rust/pull/68944. r? @michaelwoerister
2020-02-29Add a `parent_module_from_def_id` queryJohn Kåre Alsaker-0/+4
2020-02-29use .to_string() instead of format!() macro to create stringsMatthias Krüger-1/+1
2020-02-28Auto merge of #68505 - skinny121:canonicalize-const-eval-inputs, r=nikomatsakisbors-1/+1
Canonicalize inputs to const eval where needed Canonicalize inputs to const eval, so that they can contain inference variables. Which enables invoking const eval queries even if the current param env has inference variable within it, which can occur during trait selection. This is a reattempt of #67717, in a far less invasive way. Fixes #68477 r? @nikomatsakis cc @eddyb
2020-02-22add generator_kind queryMark Mansi-0/+3
2020-02-21Auto merge of #69242 - cjgillot:object_violations, r=Zoxcbors-1/+1
Querify object_safety_violations. Split from #69076 r? @Zoxc
2020-02-20Auto merge of #69072 - ecstatic-morse:associated-items, r=petrochenkovbors-1/+1
O(log n) lookup of associated items by name Resolves #68957, in which compile time is quadratic in the number of associated items. This PR makes name lookup use binary search instead of a linear scan to improve its asymptotic performance. As a result, the pathological case from that issue now runs in 8 seconds on my local machine, as opposed to many minutes on the current stable. Currently, method resolution must do a linear scan through all associated items of a type to find one with a certain name. This PR changes the result of the `associated_items` query to a data structure that preserves the definition order of associated items (which is used, e.g., for the layout of trait object vtables) while adding an index of those items sorted by (unhygienic) name. When doing name lookup, we first find all items with the same `Symbol` using binary search, then run hygienic comparison to find the one we are looking for. Ideally, this would be implemented using an insertion-order preserving, hash-based multi-map, but one is not readily available. Someone who is more familiar with identifier hygiene could probably make this better by auditing the uses of the `AssociatedItems` interface. My goal was to preserve the current behavior exactly, even if it seemed strange (I left at least one FIXME to this effect). For example, some places use comparison with `ident.modern()` and some places use `tcx.hygienic_eq` which requires the `DefId` of the containing `impl`. I don't know whether those approaches are equivalent or which one should be preferred.
2020-02-20Erase regions before before performing const eval, to improve caching.Ben Lewis-1/+1
2020-02-19Make lookup of associated item by name O(log n)Dylan MacKenzie-1/+1
2020-02-19Make is_object_safe a method.Camille GILLOT-3/+0
2020-02-18Add `is_const_impl_raw` queryDylan MacKenzie-0/+8
2020-02-18Rollup merge of #69181 - skinny121:const-eval-return, r=oli-obkDylan DPC-2/+2
Change const eval to just return the value As discussed in https://github.com/rust-lang/rust/pull/68505#discussion_r370956535, the type of consts shouldn't be returned from const eval queries. r? @eddyb cc @nikomatsakis
2020-02-17Querify object_safety_violations.Camille GILLOT-0/+3
2020-02-15Change `const_field` and `const_caller_location` to return `ConstValue` ↵Ben Lewis-2/+2
instead of `Const` as the type in the returned const isn't needed.
2020-02-14Arena allocate the result of mir_borrowckMatthew Jasper-9/+6
2020-02-14Give some more queries descriptionsMatthew Jasper-1/+6
2020-02-12Auto merge of #68679 - matthewjasper:needs-type-op, r=varkorbors-8/+11
Improve `ty.needs_drop` * Handle cycles in `needs_drop` correctly * Normalize types when computing `needs_drop` * Move queries from rustc to rustc_ty * Avoid query in simple cases reopens #65918
2020-02-09Add desc to `specialization_graph_of` queryJonas Schievink-1/+2
2020-02-09cache adt_drop_tysMatthew Jasper-1/+3
2020-02-08Make `associated_items` query return a sliceJonas Schievink-1/+1
2020-02-07Rollup merge of #68889 - Zoxc:hir-krate, r=eddybDylan DPC-0/+12
Move the `hir().krate()` method to a query and remove the `Krate` dep node r? @eddyb cc @michaelwoerister
2020-02-06Comment tweaksJohn Kåre Alsaker-1/+1
2020-02-06Move the `krate` method to Hir and remove the Krate dep nodeJohn Kåre Alsaker-0/+6
2020-02-06Add a `hir_krate` queryJohn Kåre Alsaker-0/+6
2020-02-05Make associated item lookup a queryJonas Schievink-0/+5
2020-02-02Improve needs_drop queryMatthew Jasper-8/+9
* Handle cycles in `needs_drop` correctly * Normalize types when computing `needs_drop` * Move queries from rustc to rustc_ty
2020-01-23Add projection query for upstream drop-glue instances.Michael Woerister-0/+34
This reduces the amount of invalidated data when new types are add to upstream crates.
2020-01-21Rollup merge of #68297 - Aaron1011:fix/new-const-prop-bounds, r=oli-obkYuki Okushi-3/+3
Filter and test predicates using `normalize_and_test_predicates` for const-prop Fixes #68264 Previously, I attempted to use `substitute_normalize_and_test_predicates` to detect unsatisfiable bounds. Unfortunately, since const-prop runs in a generic environment (we don't have any of the function's generic parameters substituted), this could lead to cycle errors when attempting to normalize predicates. This check is replaced with a more precise check. We now only call `normalize_and_test_predicates` on predicates that have the possibility of being proved unsatisfiable - that is, predicates that don't depend on anything local to the function (e.g. generic parameters). This ensures that we don't hit cycle errors when we normalize said predicates, while still ensuring that we detect unsatisfiable predicates. I haven't been able to come up with a minimization of the Diesel issue - however, I've verified that it compiles successfully.