Skip to content

Commit

Permalink
fix: attempt to fix ci at last
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Feb 6, 2025
1 parent 00663bf commit e6c4596
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3322,11 +3322,10 @@ impl Method {

let mut attrs = attrs_for_item(function_item, ctx);
attrs.push(attributes::inline());

/* maybe add to methods afterall?

attrs.retain(|attr| {
attr.to_string() != attributes::must_use().to_string()
});*/
});

if signature.must_use() {
attrs.push(attributes::must_use());
Expand Down Expand Up @@ -4796,6 +4795,12 @@ impl CodeGenerator for Function {

let mut attrs = attrs_for_item(item, ctx);

if !is_dynamic_function {
attrs.retain(|attr| {
attr.to_string() != attributes::must_use().to_string()
});
}

// Resolve #[must_use] attribute through return type
if signature
.return_type()
Expand Down Expand Up @@ -4911,11 +4916,6 @@ impl CodeGenerator for Function {
.unsafe_extern_blocks
.then(|| quote!(unsafe));

if is_dynamic_function {
attrs.retain(|attr| {
attr.to_string() != attributes::must_use().to_string()
});
}

let attrs = process_attributes(
result,
Expand Down

0 comments on commit e6c4596

Please sign in to comment.