Allow explicit #[repr(Rust)]

This commit is contained in:
Catherine Flores
2023-07-29 06:58:29 +00:00
parent 8771282d4e
commit f42d361a22
7 changed files with 24 additions and 8 deletions

View File

@@ -2257,6 +2257,7 @@ impl<'tcx> TyCtxt<'tcx> {
for attr in self.get_attrs(did, sym::repr) {
for r in attr::parse_repr_attr(&self.sess, attr) {
flags.insert(match r {
attr::ReprRust => ReprFlags::empty(),
attr::ReprC => ReprFlags::IS_C,
attr::ReprPacked(pack) => {
let pack = Align::from_bytes(pack as u64).unwrap();