about summary refs log tree commit diff
path: root/tests/ui/layout
AgeCommit message (Collapse)AuthorLines
2023-11-24Show number in error message even for one errorNilstrieb-4/+4
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-27fix failure to detect a too-big-type after adding paddingRalf Jung-0/+26
2023-10-25Work around the fact that `check_mod_type_wf` may spuriously return ↵Oli Scherer-3/+23
`ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types`
2023-10-20Avoid a `track_errors` by bubbling up most errors from `check_well_formed`Oli Scherer-13/+4
2023-09-11Rollup merge of #115708 - RalfJung:homogeneous, r=davidtwcoMatthias Krüger-0/+76
fix homogeneous_aggregate not ignoring some ZST This is an ABI-breaking change, because it fixes bugs in our ABI code. I'm not sure what that means for this PR, we don't really have a process for such changes, do we? I can only hope nobody relied on the old buggy behavior. Fixes https://github.com/rust-lang/rust/issues/115664
2023-09-11Disentangle `Debug` and `Display` for `Ty`.Nicholas Nethercote-5/+5
The `Debug` impl for `Ty` just calls the `Display` impl for `Ty`. This is surprising and annoying. In particular, it means `Debug` doesn't show as much information as `Debug` for `TyKind` does. And `Debug` is used in some user-facing error messages, which seems bad. This commit changes the `Debug` impl for `Ty` to call the `Debug` impl for `TyKind`. It also does a number of follow-up changes to preserve existing output, many of which involve inserting `with_no_trimmed_paths!` calls. It also adds `Display` impls for `UserType` and `Canonical`. Some tests have changes to expected output: - Those that use the `rustc_abi(debug)` attribute. - Those that use the `EMIT_MIR` annotation. In each case the output is slightly uglier than before. This isn't ideal, but it's pretty weird (particularly for the attribute) that the output is using `Debug` in the first place. They're fairly obscure attributes (I hadn't heard of them) so I'm not worried by this. For `async-is-unwindsafe.stderr`, there is one line that now lacks a full path. This is a consistency improvement, because all the other mentions of `Context` in this test lack a path.
2023-09-10fix homogeneous_aggregate not ignoring some 1-ZSTRalf Jung-0/+76
2023-09-09better spans for WF errorsRalf Jung-2/+2
2023-09-09use hir_crate_items(()).definitions() instead of hir().items()Ralf Jung-6/+6
2023-09-09rustc_layout, rustc_abi: make sure the types are well-formedRalf Jung-1/+14
2023-09-06rustc_layout/abi: error when attribute is applied to the wrong thingRalf Jung-12/+31
2023-08-29Rollup merge of #111580 - atsuzaki:layout-ice, r=oli-obkMatthias Krüger-0/+42
Don't ICE on layout computation failure Fixes #111176 regression. r? `@oli-obk`
2023-08-29there seems to be no reason to treat ZST specially in these casesRalf Jung-2/+2
2023-08-29rustc_abi: audit uses of is_zst; fix a case of giving an enum insufficient ↵Ralf Jung-0/+58
alignment
2023-08-28Don't ICE on layout computation failureKatherine Philip-0/+42
2023-08-27add rustc_abi debugging attributeRalf Jung-19/+19
2023-07-29Change default panic handler message format.Mara Bos-0/+1
2023-07-27Don't attempt to compute layout of type referencing errorMichael Goulet-0/+17
2023-07-22Rollup merge of #113957 - Urgau:regression-test-issue-113941, r=dtolnayMatthias Krüger-0/+13
Add regression test for issue #113941 - naive layout isn't refined This PR adds a regression test for issue #113941 - `the naive layout isn't refined by the actual layout` based on the minimized repro https://github.com/rust-lang/rust/issues/113941#issuecomment-1646446769.
2023-07-22Add regression test for issue #113941 - naive layout isn't refinedUrgau-0/+13
2023-07-21Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"David Tolnay-2/+2
This reverts commit 557359f92512ca88b62a602ebda291f17a953002, reversing changes made to 1e6c09a803fd543a98bfbe1624d697a55300a786.
2023-07-21Track (partial) niche information in `NaiveLayout`Moulins-2/+2
Still more complexity, but this allows computing exact `NaiveLayout`s for null-optimized enums, and thus allows calls like `transmute::<Option<&T>, &U>()` to work in generic contexts.
2023-07-21properly handle arrays and wide pointers in `naive_layout_of`Moulins-1/+1
2023-07-21add `naive_layout_of` queryMoulins-1/+1
2023-07-14i686-windows: make requested alignment > 4 special case apply transitivelyErik Desjardins-74/+74
2023-07-10aarch64-linux: properly handle 128bit aligned aggregatesErik Desjardins-0/+74
2023-07-10repr(align) <= 4 should still be byvalErik Desjardins-74/+86
2023-07-10bless layout tests for has_repr_align in debug outputErik Desjardins-0/+74
2023-06-19Better error messageMichael Goulet-1/+1
2023-06-19Don't ICE on unnormalized struct tail in layout computationMichael Goulet-0/+41
2023-06-13Add test case for unsizing with nicheWesley Wiser-0/+30
2023-05-29Make struct layout not depend on unsizeable tailLukas Markeffsky-0/+25
2023-05-05Add additional test case for repr(packed) allowing union abi opt to kick in.Luqman Aden-2/+33
2023-05-05Add test cases for #104802.Luqman Aden-11/+120
2023-05-05Do not use scalar layout if there are ZSTs with alignment > 1Oli Scherer-1/+115
2023-04-27bless testsThe 8472-20/+20
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-2/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-2/+4
2023-03-13Layout of `&dyn Trait<[type error]>` is still wideMichael Goulet-0/+22
2023-02-07Tweak ICE messageEsteban Küber-1/+1
Modify main message to be more conversational and emit one fewer note.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+2969