Skip to content

Commit ac8b1da

Browse files
authored
Merge pull request #1049 from mivort/rust-analyzer-style-warnings
Add #[allow(...)] directives to macro-generated entries
2 parents f6a309a + 457bee5 commit ac8b1da

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

godot-macros/src/class/derive_godot_class.rs

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ pub fn derive_godot_class(item: venial::Item) -> ParseResult<TokenStream> {
142142
let funcs_collection_struct_name = format_funcs_collection_struct(class_name);
143143
let funcs_collection_struct = quote! {
144144
#[doc(hidden)]
145+
#[allow(non_camel_case_types)]
145146
pub struct #funcs_collection_struct_name {}
146147
};
147148

godot-macros/src/derive/derive_from_godot.rs

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ fn make_fromgodot_for_int_enum(
7575
#(
7676
// Interesting: using let instead of const would introduce a runtime bug. Its values cannot be used in match lhs (binding).
7777
// However, bindings silently shadow variables, so the first match arm always runs; no warning in generated proc-macro code.
78+
#[allow(non_upper_case_globals)]
7879
const #ord_variables: #int = #discriminants;
7980
)*
8081

0 commit comments

Comments
 (0)