Matthias Krüger
b7183bd167
Rollup merge of #113957 - Urgau:regression-test-issue-113941, r=dtolnay
...
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-22 19:57:37 +02:00
Urgau
ffa4b6f422
Add regression test for issue #113941 - naive layout isn't refined
2023-07-22 13:02:59 +02:00
David Tolnay
5bbf0a8306
Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"
...
This reverts commit 557359f925
, reversing
changes made to 1e6c09a803
.
2023-07-21 22:35:57 -07:00
Moulins
7f109086ee
Track (partial) niche information in NaiveLayout
...
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-21 14:23:23 +02:00
Moulins
30ae640a3c
properly handle arrays and wide pointers in naive_layout_of
2023-07-21 03:31:45 +02:00
Moulins
cb8b1d1bc9
add naive_layout_of
query
2023-07-21 03:31:45 +02:00
Erik Desjardins
2daacf5af9
i686-windows: make requested alignment > 4 special case apply transitively
2023-07-14 17:48:13 -04:00
Erik Desjardins
d1e764cb3b
aarch64-linux: properly handle 128bit aligned aggregates
2023-07-10 19:19:40 -04:00
Erik Desjardins
7e933b4e26
repr(align) <= 4 should still be byval
2023-07-10 19:19:40 -04:00
Erik Desjardins
4c1dbc3aec
bless layout tests for has_repr_align in debug output
2023-07-10 19:19:39 -04:00
Michael Goulet
32f83e18ab
Better error message
2023-06-19 20:00:41 +00:00
Michael Goulet
dd620aa73a
Don't ICE on unnormalized struct tail in layout computation
2023-06-19 20:00:41 +00:00
Wesley Wiser
b982f3a988
Add test case for unsizing with niche
2023-06-13 15:32:42 -04:00
Lukas Markeffsky
381b778d27
Make struct layout not depend on unsizeable tail
2023-05-29 14:54:48 +02:00
Luqman Aden
f2d81defa1
Add additional test case for repr(packed) allowing union abi opt to kick in.
2023-05-05 16:05:04 -07:00
Luqman Aden
d5ab3a06d2
Add test cases for #104802 .
2023-05-05 16:05:03 -07:00
Oli Scherer
23d09aebc8
Do not use scalar layout if there are ZSTs with alignment > 1
2023-05-05 16:00:12 -07:00
The 8472
1a51ec6864
bless tests
2023-04-27 22:29:04 +02:00
Esteban Küber
9fadcc143a
Special-case item attributes in the suggestion output
2023-04-12 22:50:10 +00:00
Esteban Küber
5b40aa5eb4
Tweak output for 'add line' suggestion
2023-04-12 22:50:10 +00:00
Michael Goulet
0bb876ebe7
Layout of &dyn Trait<[type error]>
is still wide
2023-03-13 21:35:20 +00:00
Esteban Küber
a7597a1526
Tweak ICE message
...
Modify main message to be more conversational and emit one fewer note.
2023-02-07 19:17:24 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests
2023-01-11 09:32:08 +00:00