rust/src
Nicholas Nethercote 8723fe0b6b Clarify Layout interning.
`Layout` is another type that is sometimes interned, sometimes not, and
we always use references to refer to it so we can't take any advantage
of the uniqueness properties for hashing or equality checks.

This commit renames `Layout` as `LayoutS`, and then introduces a new
`Layout` that is a newtype around an `Interned<LayoutS>`. It also
interns more layouts than before. Previously layouts within layouts
(via the `variants` field) were never interned, but now they are. Hence
the lifetime on the new `Layout` type.

Unlike other interned types, these ones are in `rustc_target` instead of
`rustc_middle`. This reflects the existing structure of the code, which
does layout-specific stuff in `rustc_target` while `TyAndLayout` is
generic over the `Ty`, allowing the type-specific stuff to occur in
`rustc_middle`.

The commit also adds a `HashStable` impl for `Interned`, which was
needed. It hashes the contents, unlike the `Hash` impl which hashes the
pointer.
2022-03-07 13:41:47 +11:00
..
abi Clarify Layout interning. 2022-03-07 13:41:47 +11:00
bin Adjust to SourceType::InTree in several places 2021-09-20 08:45:39 -04:00
debuginfo Overhaul TyS and Ty. 2022-02-15 16:03:24 +11:00
driver Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23 2022-02-23 11:49:34 +01:00
intrinsics Clarify Layout interning. 2022-03-07 13:41:47 +11:00
optimize Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23 2022-02-23 11:49:34 +01:00
allocator.rs Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23 2022-02-23 11:49:34 +01:00
analyze.rs Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
archive.rs Unconditionally update symbols 2022-02-10 18:27:18 +01:00
base.rs Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23 2022-02-23 11:49:34 +01:00
cast.rs Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
codegen_i128.rs Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
common.rs use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
compiler_builtins.rs Use the now available implementation of IntoIterator for arrays 2021-06-14 23:40:09 +02:00
config.rs Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27 2021-05-27 13:08:14 +02:00
constant.rs Introduce ConstAllocation. 2022-03-07 08:25:50 +11:00
discriminant.rs Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05 2021-03-05 19:12:59 +01:00
inline_asm.rs Take CodegenFnAttrs into account when validating asm! register operands 2022-02-21 18:28:22 +00:00
lib.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
linkage.rs Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795' 2021-04-30 14:49:58 +02:00
main_shim.rs Normalize main return type during mono item collection & codegen 2022-02-23 22:33:50 +01:00
num.rs Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
pointer.rs Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29 2021-03-29 10:45:09 +02:00
pretty_clif.rs Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23 2022-02-23 11:49:34 +01:00
toolchain.rs Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}. 2021-06-05 21:59:41 -07:00
trap.rs Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20 2021-12-20 18:56:35 +01:00
unsize.rs Overhaul TyS and Ty. 2022-02-15 16:03:24 +11:00
value_and_place.rs Overhaul TyS and Ty. 2022-02-15 16:03:24 +11:00
vtable.rs Turn tcx.vtable_allocation() into a query. 2021-10-07 20:03:00 +02:00