summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query/mod.rs
AgeCommit message (Collapse)AuthorLines
2024-07-17Add cross-crate precise capturing support to rustdocMichael Goulet-0/+8
2024-07-14find_field does not need to be a query.Camille GILLOT-4/+0
2024-07-02Miscellaneous renamingMichael Goulet-2/+2
2024-06-29Auto merge of #120639 - fee1-dead-contrib:new-effects-desugaring, r=oli-obkbors-0/+8
Implement new effects desugaring cc `@rust-lang/project-const-traits.` Will write down notes once I have finished. * [x] See if we want `T: Tr` to desugar into `T: Tr, T::Effects: Compat<true>` * [x] Fix ICEs on `type Assoc: ~const Tr` and `type Assoc<T: ~const Tr>` * [ ] add types and traits to minicore test * [ ] update rustc-dev-guide Fixes #119717 Fixes #123664 Fixes #124857 Fixes #126148
2024-06-28implement new effects desugaringDeadbeef-0/+8
2024-06-27Make queries more explicitMichael Goulet-13/+19
2024-06-26coverage: Apply `#[coverage(..)]` recursively to nested functionsZalathar-1/+2
2024-06-26coverage: Detach `#[coverage(..)]` from codegen attribute handlingZalathar-0/+8
2024-06-18Make async drop code more consistent with regular drop codeDaria Sukhonina-6/+27
Fixes #126573
2024-06-16Rename InstanceDef -> InstanceKindMichael Goulet-6/+6
2024-06-14Only compute vtable information during codegenMichael Goulet-1/+6
2024-06-07Only compute specializes query if specialization is enabled in the crate of ↵Michael Goulet-0/+5
the specialized impl
2024-06-06Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"Rémy Rakic-13/+4
This reverts commit eda4a35f365535af72118118a3597edf5a13c12d, reversing changes made to eb6b35b5bcb3c2a594cb29cd478aeb2893f49d30.
2024-06-03check_is_object_safe -> is_object_safeMichael Goulet-1/+1
2024-05-29Start implementing needs_async_drop and relatedDaria Sukhonina-8/+9
2024-05-26Give EarlyBinder a tcx parameterMichael Goulet-13/+13
We are gonna need it to uplift EarlyBinder
2024-05-24Use regular type equating instead of a custom queryOli Scherer-9/+0
2024-05-23Improve the doc of query associated_itemr0cky-1/+1
2024-05-22rustc: Use `tcx.used_crates(())` moreVadim Petrochenkov-4/+13
And explain when it should be used.
2024-04-30Give items related to issue 33140 a more meaningful nameLeón Orell Valerian Liehr-2/+4
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-0/+1
2024-04-23Auto merge of #123992 - compiler-errors:no-has-typeck-results, r=jackh726bors-4/+0
`has_typeck_results` doesnt need to be a query self-explanatory
2024-04-17has_typeck_results doesnt need to be a queryMichael Goulet-4/+0
2024-04-16Add simple async drop glue generationzetanumbers-0/+8
Explainer: https://zetanumbers.github.io/book/async-drop-design.html https://github.com/rust-lang/rust/pull/121801
2024-04-16Rollup merge of #123995 - compiler-errors:thir-hooks, r=oli-obkGuillaume Gomez-14/+0
Make `thir_tree` and `thir_flat` into hooks No need for them to be queries, since they are only called with `-Zunpretty`
2024-04-15Make thir_tree and thir_flat into hooksMichael Goulet-14/+0
2024-04-15Just use type_dependent_def_id to figure out what the method is for an exprMichael Goulet-3/+0
2024-04-11Auto merge of #122213 - estebank:issue-50195, r=oli-obk,estebankbors-0/+3
Provide suggestion to dereference closure tail if appropriate When encoutnering a case like ```rust use std::collections::HashMap; fn main() { let vs = vec![0, 0, 1, 1, 3, 4, 5, 6, 3, 3, 3]; let mut counts = HashMap::new(); for num in vs { let count = counts.entry(num).or_insert(0); *count += 1; } let _ = counts.iter().max_by_key(|(_, v)| v); ``` produce the following suggestion ``` error: lifetime may not live long enough --> $DIR/return-value-lifetime-error.rs:13:47 | LL | let _ = counts.iter().max_by_key(|(_, v)| v); | ------- ^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is &'2 &i32 | has type `&'1 (&i32, &i32)` | help: dereference the return value | LL | let _ = counts.iter().max_by_key(|(_, v)| **v); | ++ ``` Fix #50195.
2024-04-05Provide suggestion to dereference closure tail if appropriateEsteban Küber-0/+3
When encoutnering a case like ```rust //@ run-rustfix use std::collections::HashMap; fn main() { let vs = vec![0, 0, 1, 1, 3, 4, 5, 6, 3, 3, 3]; let mut counts = HashMap::new(); for num in vs { let count = counts.entry(num).or_insert(0); *count += 1; } let _ = counts.iter().max_by_key(|(_, v)| v); ``` produce the following suggestion ``` error: lifetime may not live long enough --> $DIR/return-value-lifetime-error.rs:13:47 | LL | let _ = counts.iter().max_by_key(|(_, v)| v); | ------- ^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is &'2 &i32 | has type `&'1 (&i32, &i32)` | help: dereference the return value | LL | let _ = counts.iter().max_by_key(|(_, v)| **v); | ++ ``` Fix #50195.
2024-04-04cache type info for ParamEnvLukas Markeffsky-4/+4
2024-04-03Remove MIR unsafe checkMatthew Jasper-6/+0
This also remove safety information from MIR.
2024-03-26Remove `CacheSelector` trait now that we can use GATsOli Scherer-1/+1
2024-03-25Auto merge of #122721 - oli-obk:merge_queries, r=davidtwcobors-11/+5
Replace `mir_built` query with a hook and use mir_const everywhere instead A small perf improvement due to less dep graph handling. Mostly just a cleanup to get rid of one of our many mir queries
2024-03-22Rollup merge of #122784 - jswrenn:tag_for_variant, r=compiler-errorsMatthias Krüger-0/+7
Add `tag_for_variant` query This query allows for sharing code between `rustc_const_eval` and `rustc_transmutability`. It's a precursor to a PR I'm working on to entirely replace the bespoke layout computations in `rustc_transmutability`. r? `@compiler-errors`
2024-03-22Add `tag_for_variant` queryJack Wrenn-0/+7
This query allows for sharing code between `rustc_const_eval` and `rustc_transmutability`. Also moves `DummyMachine` to `rustc_const_eval`.
2024-03-20Split item bounds and item super predicatesMichael Goulet-6/+26
2024-03-20Update documentationOli Scherer-4/+5
2024-03-20Rename mir_const query to mir_builtOli Scherer-1/+1
2024-03-20Replace `mir_built` query with a hook and use mir_const everywhere insteadOli Scherer-7/+0
2024-03-18address nitsLukas Markeffsky-1/+1
2024-03-14clean up ADT sized constraint computationLukas Markeffsky-2/+2
2024-03-13Create some minimal HIR for associated opaque typesVadim Petrochenkov-4/+4
2024-03-12Ensure nested allocations in statics do not get deduplicatedOli Scherer-0/+2
2024-03-09Auto merge of #122010 - oli-obk:intrinsics3.0, r=pnkfelixbors-1/+1
Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn` fixes the perf regression from https://github.com/rust-lang/rust/pull/120675 by only invoking (and thus inserting into the dep graph) the `intrinsic` query if the `DefKind` matches items that can actually be intrinsics
2024-03-08Auto merge of #121500 - oli-obk:track_errors12, r=petrochenkovbors-4/+1
Merge `collect_mod_item_types` query into `check_well_formed` follow-up to https://github.com/rust-lang/rust/pull/121154 this removes more potential parallel-compiler bottlenecks and moves diagnostics for the same items next to each other, instead of grouping diagnostics by analysis kind
2024-03-07Rollup merge of #121089 - oli-obk:create_def_feed, r=petrochenkovGuillaume Gomez-3/+1
Remove `feed_local_def_id` best reviewed commit by commit Basically I returned `TyCtxtFeed` from `create_def` and then preserved that in the local caches based on https://github.com/rust-lang/rust/pull/121084 r? ````@petrochenkov````
2024-03-07Merge collect_mod_item_types query into check_well_formedOli Scherer-4/+1
2024-03-07Apply `EarlyBinder` only to `TraitRef` in `ImplTraitHeader`Yoshitomo Nakanishi-1/+1
2024-03-07Merge `check_mod_impl_wf` and `check_mod_type_wf`Oli Scherer-5/+0
2024-03-06Rollup merge of #122027 - compiler-errors:rpitit-cycle, r=spastorinoMatthias Krüger-2/+2
Uplift some feeding out of `associated_type_for_impl_trait_in_impl` and into queries This PR moves the `type_of` and `generics_of` query feeding out of `associated_type_for_impl_trait_in_impl`, since eagerly feeding results in query cycles due to a subtle interaction with `resolve_bound_vars`. Fixes #122019 r? spastorino