about summary refs log tree commit diff
path: root/tests/ui/structs/field-implied-unsizing-wfcheck.rs
AgeCommit message (Collapse)AuthorLines
2024-08-05Test more cases of WF-checking for fieldsNoah Lev-2/+23
2024-08-05WF-check struct field types at construction siteNoah Lev-0/+1
Rustc of course already WF-checked the field types at the definition site, but for error tainting of consts to work properly, there needs to be an error emitted at the use site. Previously, with no use-site error, we proceeded with CTFE and ran into ICEs since we are running code with type errors. Emitting use-site errors also brings struct-like constructors more in line with fn-like constructors since they already emit use-site errors for WF issues.
2024-08-05Add test for WF check of implied unsizing in struct fieldsNoah Lev-0/+10
Note that the test output is currently *incorrect*. We should be emitting an error at the use site too, not just at the definition. This is partly for UI reasons, but mainly to fix a related ICE where a const generic body is not tainted with an error since no usage error is reported.