about summary refs log tree commit diff
path: root/tests/ui/layout/debug.stderr
AgeCommit message (Collapse)AuthorLines
2025-06-08Remove rustc's notion of "preferred" alignment AKA `__alignof`Jubilee Young-36/+18
In PR 90877 T-lang decided not to remove `intrinsics::pref_align_of`. However, the intrinsic and its supporting code 1. is a nightly feature, so can be removed at compiler/libs discretion 2. requires considerable effort in the compiler to support, as it necessarily complicates every single site reasoning about alignment 3. has been justified based on relevance to codegen, but it is only a requirement for C++ (not C, not Rust) stack frame layout for AIX, in ways Rust would not consider even with increased C++ interop 4. is only used by rustc to overalign some globals, not correctness 5. can be adequately replaced by other rules for globals, as it mostly affects alignments for a few types under 16 bytes of alignment 6. has only one clear benefactor: automating C -> Rust translation for GNU extensions like `__alignof` 7. such code was likely intended to be `alignof` or `_Alignof`, because the GNU extension is a "false friend" of the C keyword, which makes the choice to support such a mapping very questionable 8. makes it easy to do incorrect codegen in the compiler by its mere presence as usual Rust rules of alignment (e.g. `size == align * N`) do not hold with preferred alignment The implementation is clearly damaging the code quality of the compiler. Thus it is within the compiler team's purview to simply rip it out. If T-lang wishes to have this intrinsic restored for c2rust's benefit, it would have to use a radically different implementation that somehow does not cause internal incorrectness. Until then, remove the intrinsic and its supporting code, as one tool and an ill-considered GCC extension cannot justify risking correctness. Because we touch a fair amount of the compiler to change this at all, and unfortunately the duplication of AbiAndPrefAlign is deep-rooted, we keep an "AbiAlign" type which we can wean code off later.
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-15/+15
2025-02-28adjust Layout debug printing to match the internal field namesRalf Jung-18/+18
2025-02-20Update ui tests with `LayoutData { uninhabited: ... }` etcZachary S-1/+21
2025-02-18clean up layout error diagnosticsLukas Markeffsky-1/+1
- group the fluent slugs together - reword (internal-only) "too generic" error to be more in line with the other errors
2025-02-18document and test all `LayoutError` variantsLukas Markeffsky-1/+7
2025-01-14Consider more erroneous layouts as LayoutError::ReferencesError to suppress ↵Michael Goulet-1/+1
spurious errors
2025-01-10adjust UI testsThe 8472-19/+37
2024-10-30tests: Bless `rustc_abi::Abi::Aggregate` => `::Memory`Jubilee Young-10/+10
2024-09-16layout computation: eagerly error for unexpected unsized fieldsLukas Markeffsky-1/+13
2023-09-11Disentangle `Debug` and `Display` for `Ty`.Nicholas Nethercote-2/+2
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-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/+11
2023-09-06rustc_layout/abi: error when attribute is applied to the wrong thingRalf Jung-10/+22
2023-08-29there seems to be no reason to treat ZST specially in these casesRalf Jung-2/+2
2023-08-27add rustc_abi debugging attributeRalf Jung-18/+18
2023-07-14i686-windows: make requested alignment > 4 special case apply transitivelyErik Desjardins-18/+18
2023-07-10aarch64-linux: properly handle 128bit aligned aggregatesErik Desjardins-0/+18
2023-07-10repr(align) <= 4 should still be byvalErik Desjardins-18/+18
2023-07-10bless layout tests for has_repr_align in debug outputErik Desjardins-0/+18
2023-05-05Add additional test case for repr(packed) allowing union abi opt to kick in.Luqman Aden-2/+29
2023-05-05Add test cases for #104802.Luqman Aden-10/+98
2023-05-05Do not use scalar layout if there are ZSTs with alignment > 1Oli Scherer-1/+94
2023-01-11Move /src/test to /testsAlbert Larsan-0/+311