summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query
AgeCommit message (Collapse)AuthorLines
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-3/+3
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
2024-03-05Merge `impl_trait_in_assoc_types_defined_by` query back into ↵Oli Scherer-9/+0
`opaque_types_defined_by` Instead, when we're collecting opaques for associated items, we choose the right collection mode depending on whether we're collecting for an associated item of a trait impl or not.
2024-03-05Uplift some feeding out of associated_type_for_impl_trait_in_impl and into ↵Michael Goulet-2/+2
queries
2024-03-05Avoid using feed_unit_query from within queriesOli Scherer-2/+1
2024-03-05Remove a use of feed_local_crate and make it fail if used within queriesOli Scherer-1/+0
2024-03-05Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn`Oli Scherer-1/+1
2024-03-04Return a struct from `query intrinsic` to be able to add another field in ↵Oli Scherer-2/+2
the next commit
2024-02-24compiler: use `addr_of!`Pavel Grigorenko-2/+2
2024-02-20Rollup merge of #121344 - fmease:lta-constr-by-input, r=oli-obkMatthias Krüger-10/+22
Expand weak alias types before collecting constrained/referenced late bound regions + refactorings Fixes #114220. Follow-up to #120780. r? `@oli-obk`
2024-02-20Rename some normalization-related itemsLeón Orell Valerian Liehr-10/+22
2024-02-18resolve: Scale back unloading of speculatively loaded cratesVadim Petrochenkov-0/+7
2024-02-16Auto merge of #120500 - oli-obk:intrinsics2.0, r=WaffleLapkinbors-2/+3
Implement intrinsics with fallback bodies fixes #93145 (though we can port many more intrinsics) cc #63585 The way this works is that the backend logic for generating custom code for intrinsics has been made fallible. The only failure path is "this intrinsic is unknown". The `Instance` (that was `InstanceDef::Intrinsic`) then gets converted to `InstanceDef::Item`, which represents the fallback body. A regular function call to that body is then codegenned. This is currently implemented for * codegen_ssa (so llvm and gcc) * codegen_cranelift other backends will need to adjust, but they can just keep doing what they were doing if they prefer (though adding new intrinsics to the compiler will then require them to implement them, instead of getting the fallback body). cc `@scottmcm` `@WaffleLapkin` ### todo * [ ] miri support * [x] default intrinsic name to name of function instead of requiring it to be specified in attribute * [x] make sure that the bodies are always available (must be collected for metadata)
2024-02-15Return ConstAllocation from eval_static_initializer query directlyOli Scherer-2/+2
2024-02-15Store static initializers in metadata instead of the MIR of statics.Oli Scherer-0/+1
2024-02-15Add new query just for static initializersOli Scherer-2/+13
2024-02-13Auto merge of #120919 - oli-obk:impl_polarity, r=compiler-errorsbors-8/+4
Merge `impl_polarity` and `impl_trait_ref` queries Hopefully this is perf neutral. I want to finish https://github.com/rust-lang/rust/pull/120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
2024-02-12Rollup merge of #120958 - ShoyuVanilla:remove-subst, r=oli-obkMatthias Krüger-2/+2
Dejargonize `subst` In favor of #110793, replace almost every occurence of `subst` and `substitution` from rustc codes, but they still remains in subtrees under `src/tools/` like clippy and test codes (I'd like to replace them after this)
2024-02-12Auto merge of #120980 - matthiaskrgr:rollup-dsjsqql, r=matthiaskrgrbors-3/+3
Rollup of 11 pull requests Successful merges: - #120765 (Reorder diagnostics API) - #120833 (More internal emit diagnostics cleanups) - #120899 (Gracefully handle non-WF alias in `assemble_alias_bound_candidates_recur`) - #120917 (Remove a bunch of dead parameters in functions) - #120928 (Add test for recently fixed issue) - #120933 (check_consts: fix duplicate errors, make importance consistent) - #120936 (improve `btree_cursors` functions documentation) - #120944 (Check that the ABI of the instance we are inlining is correct) - #120956 (Clean inlined type alias with correct param-env) - #120962 (Add myself to library/std review) - #120972 (fix ICE for deref coercions with type errors) r? `@ghost` `@rustbot` modify labels: rollup
2024-02-12Remove impl_polarity queryOli Scherer-4/+0
2024-02-12Use a struct instead of a tupleOli Scherer-4/+3
2024-02-12Make impl_trait_ref into a query also returning more information about the implOli Scherer-4/+5
2024-02-12Make `is_intrinsic` query return the intrinsic nameOli Scherer-2/+3
2024-02-12Tweak delayed bug mentions.Nicholas Nethercote-3/+3
Now that we have both `delayed_bug` and `span_delayed_bug`, it makes sense to use the generic term "delayed bug" more.
2024-02-12Dejargnonize substShoyu Vanilla-2/+2
2024-02-12Lowering field access for anonymous adtsFrank King-0/+5
2024-02-06Bless tests, add commentsMichael Goulet-1/+1
2024-02-06Teach typeck/borrowck/solvers how to deal with async closuresMichael Goulet-0/+5
2024-02-03hir: Remove the generic type parameter from `MaybeOwned`Vadim Petrochenkov-2/+2
It's only ever used with a reference to `OwnerInfo` as an argument.
2024-01-31Auto merge of #120346 - petrochenkov:ownodes, r=oli-obkbors-2/+2
hir: Refactor getters for owner nodes
2024-01-30hir: Simplify `hir_owner_nodes` queryVadim Petrochenkov-2/+2
The query accept arbitrary DefIds, not just owner DefIds. The return can be an `Option` because if there are no nodes, then it doesn't matter whether it's due to NonOwner or Phantom. Also rename the query to `opt_hir_owner_nodes`.
2024-01-27Remove unnecessary unit returns in query declarationsDaniPopes-14/+14
For consistency with normal functions.
2024-01-26Auto merge of #116167 - RalfJung:structural-eq, r=lcnrbors-2/+2
remove StructuralEq trait The documentation given for the trait is outdated: *all* function pointers implement `PartialEq` and `Eq` these days. So the `StructuralEq` trait doesn't really seem to have any reason to exist any more. One side-effect of this PR is that we allow matching on some consts that do not implement `Eq`. However, we already allowed matching on floats and consts containing floats, so this is not new, it is just allowed in more cases now. IMO it makes no sense at all to allow float matching but also sometimes require an `Eq` instance. If we want to require `Eq` we should adjust https://github.com/rust-lang/rust/pull/115893 to check for `Eq`, and rule out float matching for good. Fixes https://github.com/rust-lang/rust/issues/115881
2024-01-25Rollup merge of #119895 - oli-obk:track_errors_3, r=matthewjasperMatthias Krüger-2/+11
Remove `track_errors` entirely follow up to https://github.com/rust-lang/rust/pull/119869 r? `@matthewjasper` There are some diagnostic changes adding new diagnostics or not emitting some anymore. We can improve upon that in follow-up work imo.
2024-01-24remove StructuralEq traitRalf Jung-2/+2
2024-01-23Remove track_errors entirelyOli Scherer-2/+11
2024-01-22Add a simpler and more targetted code path for impl trait in assoc itemsOli Scherer-0/+9
2024-01-19Auto merge of #120112 - matthiaskrgr:rollup-48o3919, r=matthiaskrgrbors-11/+21
Rollup of 9 pull requests Successful merges: - #119582 (bootstrap: handle vendored sources when remapping crate paths) - #119730 (docs: fix typos) - #119828 (Improved collapse_debuginfo attribute, added command-line flag) - #119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`) - #120037 (Remove `next_root_ty_var`) - #120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18) - #120096 (Set RUSTC_BOOTSTRAP=1 consistently) - #120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned) - #120102 (Fix typo in munmap_partial.rs) r? `@ghost` `@rustbot` modify labels: rollup
2024-01-19Auto merge of #120006 - cjgillot:no-hir-owner, r=wesleywiserbors-13/+0
Get rid of the hir_owner query. This query was meant as a firewall between `hir_owner_nodes` which is supposed to change often, and the queries that only depend on the item signature. That firewall was inefficient, leaking the contents of the HIR body through `HirId`s. `hir_owner` incurs a significant cost, as we need to hash HIR twice in multiple modes. This PR proposes to remove it, and simplify the hashing scheme. For the future, `def_kind`, `def_span`... are much more efficient for incremental decoupling, and should be preferred.
2024-01-18Rollup merge of #119869 - oli-obk:track_errors2, r=matthewjasperMatthias Krüger-11/+21
replace `track_errors` usages with bubbling up `ErrorGuaranteed` more of the same as https://github.com/rust-lang/rust/pull/117449 (removing `track_errors`)
2024-01-17Correctly handle normalization in implied boundsAli MJ Al-Nasrawy-1/+14
Special-case Bevy dependents to not error
2024-01-17Make crate_inherent_impls fallible and stop using `track_errors` for itOli Scherer-9/+17
2024-01-17Make crate_inherent_impls_overlap_check bubble up its errorsOli Scherer-1/+2