diff --git a/luisa_compute_derive_impl/src/lib.rs b/luisa_compute_derive_impl/src/lib.rs index 36f5720..ed9add1 100644 --- a/luisa_compute_derive_impl/src/lib.rs +++ b/luisa_compute_derive_impl/src/lib.rs @@ -55,13 +55,10 @@ impl Compiler { let path = &list.path; if path.is_ident("repr") { for tok in list.tokens.clone().into_iter() { - match tok { - TokenTree::Ident(ident) => { - if ident == "C" { - has_repr_c = true; - } + if let TokenTree::Ident(ident) = tok { + if ident == "C" || ident == "transparent" { + has_repr_c = true; } - _ => {} } } } else if path.is_ident("value_new") {