Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #[allow(...)] directives to macro-generated entries #1049

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions godot-macros/src/class/derive_godot_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ pub fn derive_godot_class(item: venial::Item) -> ParseResult<TokenStream> {
let funcs_collection_struct_name = format_funcs_collection_struct(class_name);
let funcs_collection_struct = quote! {
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct #funcs_collection_struct_name {}
};

Expand Down
1 change: 1 addition & 0 deletions godot-macros/src/derive/derive_from_godot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fn make_fromgodot_for_int_enum(
#(
// Interesting: using let instead of const would introduce a runtime bug. Its values cannot be used in match lhs (binding).
// However, bindings silently shadow variables, so the first match arm always runs; no warning in generated proc-macro code.
#[allow(non_upper_case_globals)]
const #ord_variables: #int = #discriminants;
)*

Expand Down
Loading