about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/impls_ty.rs
AgeCommit message (Collapse)AuthorLines
2025-05-27Rename unpack to kindMichael Goulet-1/+1
2024-09-10const-eval interning: accpt interior mutable pointers in final value (but ↵Ralf Jung-3/+1
keep rejecting mutable references)
2024-07-29Reformat `use` declarations.Nicholas Nethercote-7/+9
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-30Uplift fast rejection to new solverMichael Goulet-13/+0
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_middle`.Nicholas Nethercote-0/+1
2024-04-06add RawListLukas Markeffsky-14/+5
2024-04-04cache type info for ParamEnvLukas Markeffsky-0/+10
2023-12-07ctfe interpreter: extend provenance so that it can track whether a pointer ↵Ralf Jung-0/+8
is immutable
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-1/+1
2023-04-20Derive `HashStable` on `GenericArgKind` instead of implementing it by handMaybe Waffle-28/+0
2023-02-24Rename many interner functions.Nicholas Nethercote-1/+1
(This is a large commit. The changes to `compiler/rustc_middle/src/ty/context.rs` are the most important ones.) The current naming scheme is a mess, with a mix of `_intern_`, `intern_` and `mk_` prefixes, with little consistency. In particular, in many cases it's easy to use an iterator interner when a (preferable) slice interner is available. The guiding principles of the new naming system: - No `_intern_` prefixes. - The `intern_` prefix is for internal operations. - The `mk_` prefix is for external operations. - For cases where there is a slice interner and an iterator interner, the former is `mk_foo` and the latter is `mk_foo_from_iter`. Also, `slice_interners!` and `direct_interners!` can now be `pub` or non-`pub`, which helps enforce the internal/external operations division. It's not perfect, but I think it's a clear improvement. The following lists show everything that was renamed. slice_interners - const_list - mk_const_list -> mk_const_list_from_iter - intern_const_list -> mk_const_list - substs - mk_substs -> mk_substs_from_iter - intern_substs -> mk_substs - check_substs -> check_and_mk_substs (this is a weird one) - canonical_var_infos - intern_canonical_var_infos -> mk_canonical_var_infos - poly_existential_predicates - mk_poly_existential_predicates -> mk_poly_existential_predicates_from_iter - intern_poly_existential_predicates -> mk_poly_existential_predicates - _intern_poly_existential_predicates -> intern_poly_existential_predicates - predicates - mk_predicates -> mk_predicates_from_iter - intern_predicates -> mk_predicates - _intern_predicates -> intern_predicates - projs - intern_projs -> mk_projs - place_elems - mk_place_elems -> mk_place_elems_from_iter - intern_place_elems -> mk_place_elems - bound_variable_kinds - mk_bound_variable_kinds -> mk_bound_variable_kinds_from_iter - intern_bound_variable_kinds -> mk_bound_variable_kinds direct_interners - region - intern_region (unchanged) - const - mk_const_internal -> intern_const - const_allocation - intern_const_alloc -> mk_const_alloc - layout - intern_layout -> mk_layout - adt_def - intern_adt_def -> mk_adt_def_from_data (unusual case, hard to avoid) - alloc_adt_def(!) -> mk_adt_def - external_constraints - intern_external_constraints -> mk_external_constraints Other - type_list - mk_type_list -> mk_type_list_from_iter - intern_type_list -> mk_type_list - tup - mk_tup -> mk_tup_from_iter - intern_tup -> mk_tup
2022-11-06interpret: support for per-byte provenanceRalf Jung-13/+0
2022-08-27interpret: rename relocation → provenanceRalf Jung-1/+1
2022-07-29remove some manual hash stable implslcnr-40/+0
2022-07-20rename get_global_alloc to try_get_global_allocRalf Jung-1/+1
2022-07-19interpret: rename Tag/PointerTag to Prov/ProvenanceRalf Jung-2/+2
Let's avoid using two different terms for the same thing -- let's just call it "provenance" everywhere. In Miri, provenance consists of an AllocId and an SbTag (Stacked Borrows tag), which made this even more confusing.
2022-06-19Move RegionKind to rustc_type_irJack Huey-37/+5
2022-05-26rebase, use Ty in CallArgument and re-insert static_assert_size on ↵b-naber-2/+2
ConstraintCategory
2022-05-25add def_id and substs to ConstraintCategory::CallArgumentb-naber-2/+2
2022-05-10Auto merge of #94799 - lcnr:list-ty-perf, r=petrochenkovbors-7/+5
update `hash_stable` for `List<Ty<'tcx>>` cc https://github.com/rust-lang/rust/pull/93505#issuecomment-1047538798 this is the hottest part changed since the pre-merge perf run
2022-03-30rework implementation for inherent impls for builtin typeslcnr-0/+13
2022-03-10don't hash `()`lcnr-1/+1
2022-03-10update `hash_stable` for `List<Ty<'tcx>>`lcnr-7/+5
2022-02-21reviewlcnr-0/+8
2022-02-21safely `transmute<&List<Ty<'tcx>>, &List<GenericArg<'tcx>>>`lcnr-0/+22
2022-01-05Ensure that `Fingerprint` caching respects hashing configurationAaron Hill-2/+3
Fixes #92266 In some `HashStable` impls, we use a cache to avoid re-computing the same `Fingerprint` from the same structure (e.g. an `AdtDef`). However, the `StableHashingContext` used can be configured to perform hashing in different ways (e.g. skipping `Span`s). This configuration information is not included in the cache key, which will cause an incorrect `Fingerprint` to be used if we hash the same structure with different `StableHashingContext` settings. To fix this, the configuration settings of `StableHashingContext` are split out into a separate `HashingControls` struct. This struct is used as part of the cache key, ensuring that our caches always produce the correct result for the given settings. With this in place, we now turn off `Span` hashing during the entire process of computing the hash included in legacy symbols. This current has no effect, but will matter when a future PR starts hashing more `Span`s that we currently skip.
2021-10-03Fully remove rustc_middle::ich.Camille GILLOT-0/+165