Skip to content

Commit 4abcf03

Browse files
committed
Allow non camel case metrics and settings
1 parent 945a80f commit 4abcf03

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

macros/src/metric.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub(crate) fn metric_helper(args: Args) -> TokenStream {
3131
cortex_m::interrupt::free(|_| {
3232
#[used]
3333
#[unsafe(export_name = #sym_name)]
34+
#[allow(non_upper_case_globals)]
3435
static mut #static_name: (#ty, bool) =
3536
(0, false);
3637

macros/src/metric_from_address.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub fn make_metric_from_address(args: TokenStream) -> TokenStream {
2828
quote! {
2929
#[used]
3030
#[unsafe(export_name = #sym_name)]
31+
#[allow(non_upper_case_globals)]
3132
static #static_name: u8 = 0;
3233
}
3334
.into()

macros/src/setting.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub(crate) fn make_setting(args: TokenStream) -> TokenStream {
2828
cortex_m::interrupt::free(|_| {
2929
#[used]
3030
#[unsafe(export_name = #sym_name)]
31+
#[allow(non_upper_case_globals)]
3132
static mut #static_name: (#ty, bool) =
3233
(0, false);
3334

0 commit comments

Comments
 (0)