Skip to content

Commit

Permalink
Guide users who used the suggested (invalid) fix (#1)
Browse files Browse the repository at this point in the history
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
  • Loading branch information
lukaslihotzki and RReverser committed Sep 7, 2022
1 parent 84d6c85 commit 91334cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/macro-support/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,11 @@ impl Parse for BindgenAttr {

attrgen!(parsers);

return Err(original.error("unknown attribute"));
return Err(original.error(if attr_string.starts_with("_") {
"unknown attribute: it's safe to remove unused attributes entirely."
} else {
"unknown attribute"
}));
}
}

Expand Down

0 comments on commit 91334cc

Please sign in to comment.