Skip to content

Commit

Permalink
Added repr transparent.
Browse files Browse the repository at this point in the history
  • Loading branch information
entropylost committed Oct 20, 2023
1 parent edbe1b9 commit 283772c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions luisa_compute_derive_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 283772c

Please sign in to comment.