about summary refs log tree commit diff
path: root/src/test/ui/layout
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2969/+0
2023-01-04layout_of: `T: Thin` implies `sizeof(&T) == sizeof(usize)`Michael Goulet-0/+11
2022-11-25Add a test for OOB rangesOli Scherer-0/+21
2022-11-22fix tests, update size assertsThe 8472-10/+10
2022-09-07Change name of "dataful" variant to "untagged"Michael Benfield-3/+3
This is in anticipation of a new enum layout, in which the niche optimization may be applied even when multiple variants have data.
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-2/+2
2022-07-31reorder fields in Laout debug outputRalf Jung-920/+920
2022-07-30Test another enum niche with multiple ZST alignmentsJosh Stone-3/+132
2022-07-30Fix the size of niche enums with ZST alignmentJosh Stone-0/+340
For enums with an aligned ZST variant, like `[T; 0]`, the niche layout was not computing a sufficient size to be consistent with alignment. Now we pad that size up to the alignment, and also make sure to only use the niche variant's ABI when the size and alignment still match.
2022-07-13Limit test to x86 targets for reproducabilityOli Scherer-0/+1
2022-07-12Always check Cell alongside with `UnsafeCell`Oli Scherer-1/+12
2022-07-12Use some more visible sigils than `,`Oli Scherer-16/+16
2022-07-11Only check relative sizes on platform specific typesOli Scherer-37/+32
2022-07-11tidyOli Scherer-1/+4
2022-07-11Simplify size checkingOli Scherer-39/+31
2022-07-11Don't allow accidental runtime-checksOli Scherer-51/+50
2022-07-11tidyOli Scherer-4/+16
2022-07-11Make tests work on 32 bit and 64 bitOli Scherer-19/+22
2022-07-11Show sizes in error outputOli Scherer-1/+3
2022-07-11Rename assertion macroOli Scherer-27/+27
2022-07-11Simplify assertion macroOli Scherer-29/+28
2022-07-11Move checks to compile-timeOli Scherer-1/+8
2022-07-11Hide niches in SIMD types, tooOli Scherer-0/+8
2022-07-08Create a custom layout path for UnsafeCell instead of piggy backing on the ↵Oli Scherer-0/+9
layout_scalar_valid_range logic
2022-07-08Add tests for libstd typesOli Scherer-5/+17
2022-07-07`UnsafeCell` now has no niches, ever.Oli Scherer-4/+1
2022-07-05fix the layout of repr(align) enumsRalf Jung-0/+191
2022-07-01Shorten def_span for more items.Camille GILLOT-53/+36
2022-05-09make sure ScalarPair enums have ScalarPair variants; add some layout sanity ↵Ralf Jung-21/+109
checks
2022-05-06make Size and Align debug-printing a bit more compactRalf Jung-521/+190
2022-04-22normalize out pref_align (copied from another test)Erik Desjardins-56/+23
2022-04-18mark payload fields of ScalarPair enums as Scalar::Union when they're not ↵Erik Desjardins-0/+807
always initialized
2022-04-05Mark scalar layout unions so that backends that do not support partially ↵Oli Scherer-111/+87
initialized scalars can special case them.
2021-11-20Align multiline messages to their label (add left margin)Esteban Kuber-1137/+1137
2021-08-12Add c_enum_min_bits to target specManish Goregaokar-0/+476
2021-07-27Make all tests use type_alias_impl_trait feature instead of minSantiago Pastorino-1/+1
2021-04-13Fix ICE during type layout when there's a `[type error]`Camelid-0/+58
Based on estebank's [comment], except I used `delay_span_bug` because it should work in more cases, and I think it expresses its intent more clearly. [comment]: https://github.com/rust-lang/rust/issues/84108#issuecomment-818916848
2021-03-15Replace `type_alias_impl_trait` by `min_type_alias_impl_trait` with no ↵Oli Scherer-2/+2
actual changes in behaviour This makes `type_alias_impl_trait` not actually do anything anymore
2021-02-22Test hexagon-enum only when llvm target is presentSimonas Kazlauskas-5/+6
See https://github.com/rust-lang/rust/pull/82379#issuecomment-783439754
2021-02-22Fix sizes of repr(C) enums on hexagonSimonas Kazlauskas-0/+475
Enums on hexagon use a smallest size (but at least 1 byte) that fits all the enumeration values. This is unlike many other ABIs where enums are at least 32 bits.
2020-11-18change error for `LayoutErr::SizeOverflow`Bastian Kauschke-0/+13
2020-05-30tag/niche terminology cleanupRalf Jung-6/+6
2020-04-16rustc_target::abi: add Primitive variant to FieldsShape.Ana-Maria Mihalache-3/+1
2020-04-06tweak rustc_layout debug outputRalf Jung-10/+10
2020-04-05also print type typeRalf Jung-5/+5
2020-04-05also print rustc_layout on impl trait type aliasesRalf Jung-2/+41
2020-03-25Rename LayoutDetails to just Layout.Ana-Maria Mihalache-8/+8
2020-03-21normalize away preferred alignmentRalf Jung-28/+13
2020-03-20make rustc_layout also work for type definitionsRalf Jung-6/+228
2020-03-20add a test for rustc_layout(debug)Ralf Jung-0/+127