about summary refs log tree commit diff
path: root/tests/codegen/dst-offset.rs
AgeCommit message (Collapse)AuthorLines
2025-06-16tests: `PointeeSized` bounds with extern typesDavid Wood-2/+3
These tests necessarily need to change now that `?Sized` is not sufficient to accept extern types and `PointeeSized` is now necessary. In addition, the `size_of_val`/`align_of_val` test can now be changed to expect an error.
2024-05-31Run rustfmt on `tests/codegen/`.Nicholas Nethercote-29/+28
Except for `simd-intrinsic/`, which has a lot of files containing multiple types like `u8x64` which really are better when hand-formatted. There is a surprising amount of two-space indenting in this directory. Non-trivial changes: - `rustfmt::skip` needed in `debug-column.rs` to preserve meaning of the test. - `rustfmt::skip` used in a few places where hand-formatting read more nicely: `enum/enum-match.rs` - Line number adjustments needed for the expected output of `debug-column.rs` and `coroutine-debug.rs`.
2024-03-10use ptradd for vtable indexingErik Desjardins-2/+2
Like field offsets, these are always constant.
2024-03-06add test for extern typeErik Desjardins-0/+15
2024-03-04use GEP inbounds for ZST and DST field offsetsErik Desjardins-0/+69
For the former, it's fine for `inbounds` offsets to be one-past-the-end, so it's okay even if the ZST is the last field in the layout: > The base pointer has an in bounds address of an allocated object, > which means that it points into an allocated object, or to its end. https://llvm.org/docs/LangRef.html#getelementptr-instruction For the latter, even DST fields must always be inside the layout (or to its end for ZSTs), so using inbounds is also fine there.