about summary refs log tree commit diff
path: root/tests/ui/abi/debug.stderr
AgeCommit message (Collapse)AuthorLines
2025-07-04Fixed the ABI parameter inconsistency issue in debug.rs for the riscv64 ↵YingkaiLi-VM-991/+0
architecture.
2025-07-03minicore: use core's `diagnostic::on_unimplemented` messagesFolkert de Vries-15/+15
2025-06-08Remove rustc's notion of "preferred" alignment AKA `__alignof`Jubilee Young-48/+24
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-04-17Replace infallible `name_or_empty` methods with fallible `name` methods.Nicholas Nethercote-1/+1
I'm removing empty identifiers everywhere, because in practice they always mean "no identifier" rather than "empty identifier". (An empty identifier is impossible.) It's better to use `Option` to mean "no identifier" because you then can't forget about the "no identifier" possibility. Some specifics: - When testing an attribute for a single name, the commit uses the `has_name` method. - When testing an attribute for multiple names, the commit uses the new `has_any_name` method. - When using `match` on an attribute, the match arms now have `Some` on them. In the tests, we now avoid printing empty identifiers by not printing the identifier in the `error:` line at all, instead letting the carets point out the problem.
2025-04-17Augment some tests involving attributes.Nicholas Nethercote-1/+7
This shows places where the use of `name_or_empty` causes problems, i.e. we print empty identifiers in error messages: ``` error: unrecognized field name `` error: `` isn't a valid `#[macro_export]` argument `#[no_sanitize()]` should be applied to a function ``` (The last one is about an attribute `#[no_sanitize("address")]`.) The next commit will fix these.
2025-02-28adjust Layout debug printing to match the internal field namesRalf Jung-24/+24
2025-02-20Update ui tests with `LayoutData { uninhabited: ... }` etcZachary S-0/+24
2025-01-10adjust UI testsThe 8472-11/+35
2024-10-30tests: Bless `rustc_abi::Abi::Aggregate` => `::Memory`Jubilee Young-12/+12
2024-05-06Refactor float `Primitive`s to a separate `Float` typebeetrees-1/+3
2023-09-17Rollup merge of #115654 - RalfJung:pass-mode-cast, r=compiler-errorsDylan DPC-2/+2
improve PassMode docs
2023-09-15special case `TyAndLayout` debug implBoxy-15/+15
2023-09-15clarify PassMode::Indirect as wellRalf Jung-2/+2
2023-09-11Disentangle `Debug` and `Display` for `Ty`.Nicholas Nethercote-15/+15
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-94/+94
2023-09-09rustc_layout, rustc_abi: make sure the types are well-formedRalf Jung-1/+11
2023-09-08also ensure that size and alignment are the sameRalf Jung-3/+151
2023-09-08accept some differences for rustc_abi(assert_eq), so that we can test more ↵Ralf Jung-1/+290
things to be compatible
2023-09-07add support for rustc_abi(assert_eq) and use it to test some ↵Ralf Jung-1/+147
repr(transparent) cases
2023-09-06rustc_layout/abi: error when attribute is applied to the wrong thingRalf Jung-5/+17
2023-09-06rustc_abi: also support debugging function pointersRalf Jung-6/+100
2023-08-27add rustc_abi debugging attributeRalf Jung-0/+260