summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/layout.rs
AgeCommit message (Collapse)AuthorLines
2020-11-08rustc_target: Rename some target options to avoid tautologyVadim Petrochenkov-6/+5
`target.target_endian` -> `target.endian` `target.target_c_int_width` -> `target.c_int_width` `target.target_os` -> `target.os` `target.target_env` -> `target.env` `target.target_vendor` -> `target.vendor` `target.target_family` -> `target.os_family` `target.target_mcount` -> `target.mcount`
2020-11-08Collapse all uses of `target.options.foo` into `target.foo`Vadim Petrochenkov-1/+1
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
2020-10-15Replace target.target with target and target.ptr_width with target.pointer_widthest31-4/+4
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
2020-10-13Replace absolute paths with relative onesest31-1/+1
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-06Rollup merge of #76995 - LingMan:middle_matches, r=varkorYuki Okushi-4/+1
Reduce boilerplate with the matches! macro Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro. Limited to rustc_middle for now to get my feet wet.
2020-10-02Returns values up to 2*usize by valueJonas Schievink-2/+3
2020-09-26Return values up to 128 bits in registersJonas Schievink-4/+8
2020-09-25Auto merge of #73453 - erikdesjardins:tuplayout, r=eddybbors-65/+47
Ignore ZST offsets when deciding whether to use Scalar/ScalarPair layout This is important because Scalar/ScalarPair layout previously would not be used if any ZST had nonzero offset. For example, before this change, only `((), u128)` would be laid out like `u128`, not `(u128, ())`. Fixes #63244
2020-09-21Reduce boilerplate with the matches! macroLingMan-4/+1
Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro.
2020-09-20do not ICE on `ty::Bound` in Layout::computeBastian Kauschke-2/+2
2020-09-04Change ty.kind to a methodLeSeulArtichaut-14/+16
2020-09-02Fix some unwanted uses of Debug formatting on user-facing messagesDan Aloni-2/+2
While formatting for user diagnostics used `Display` for all most cases, some small amount of cases used `Debug` instead. Until now, `Display` and `Debug` yielded the same output for many types. However, with path trimming, we want to show a shorter path for the user, these cases need fixing.
2020-08-30ignore zst offsets insteadErik Desjardins-78/+53
2020-08-30allow reordering of the last field of a MaybeUnsized struct if it's a ZSTErik Desjardins-6/+13
2020-08-30mv compiler to compiler/mark-0/+2829