Lines Matching defs:Rust

34     /// A compound representation: `repr(C)`, `repr(Rust)`, or `repr(Int)`
39 /// A compound representation: `repr(C)`, `repr(Rust)`, or `repr(Int)`.
43 Rust,
95 Rust => "repr(Rust)",
221 Rust => ts.append_all(quote_spanned! { self.span=> #[repr(Rust)] }),
251 // serializes `u32` literals as `123u32`, not just `123`. Rust doesn't
275 Rust,
316 Rust => Ok(CompoundRepr::Rust),
332 Transparent | C | Rust | Align(_) | PackedN(_) | Packed => {
356 | Transparent | C | Rust | Align(_) => Err(UnsupportedReprError),
364 | Transparent | C | Rust => Err(FromRawReprError::None),
502 compound.unwrap_or(Spanned::new(CompoundRepr::Rust, Span::call_site())),
601 ("Rust", None) => Rust,
738 // Force Rust to infer `got` as having the same type as
751 // Rust treats raw identifiers and their ordinary spellings as the
766 test_raw_repr!(Rust, r#Rust => RawRepr::Rust);
785 test!(#[repr()] => StructUnionRepr::Compound(Rust.into(), None));
786 test!(#[repr(packed)] => StructUnionRepr::Compound(Rust.into(), Some(Packed(nz(1)).into())));
787 test!(#[repr(packed(2))] => StructUnionRepr::Compound(Rust.into(), Some(Packed(nz(2)).into())));
788 test!(#[repr(align(1))] => StructUnionRepr::Compound(Rust.into(), Some(Align(nz(1)).into())));
789 test!(#[repr(align(2))] => StructUnionRepr::Compound(Rust.into(), Some(Align(nz(2)).into())));
799 test!(#[repr()] => EnumRepr::Compound(Rust.into(), None));
800 test!(#[repr(align(1))] => EnumRepr::Compound(Rust.into(), Some(Align(nz(1)).into())));
801 test!(#[repr(align(2))] => EnumRepr::Compound(Rust.into(), Some(Align(nz(2)).into())));
844 test!(@error #[repr(transparent, Rust)] => $repr => FromRawReprs(Conflict).into());
848 test!(@error #[repr(C, Rust)] => $repr => FromRawReprs(Conflict).into());
850 test!(@error #[repr(Rust, transparent)] => $repr => FromRawReprs(Conflict).into());
851 test!(@error #[repr(Rust, C)] => $repr => FromRawReprs(Conflict).into());
852 test!(@error #[repr(Rust, Rust)] => $repr => FromRawReprs(Conflict).into());
870 test!(@error #[repr(Rust, u8)] => EnumRepr => FromRawReprs(Conflict).into());
871 test!(@error #[repr(u8, Rust)] => EnumRepr => FromRawReprs(Conflict).into());