Skip to content

Commit 6b14520

Browse files
authored
Merge pull request #796 from rust-embedded/Ux
cargo doc constants generation
2 parents 8e64fe0 + cd11fdf commit 6b14520

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
- Fix `cargo doc` constants generation
11+
1012
## [v0.31.4] - 2024-01-03
1113

1214
- Custom prefix/case/suffix for identifiers (by `svd2rust.toml` config file)

src/generate/register.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ pub fn render_register_mod(
416416
mod_items.extend(quote! {
417417
#[doc = #doc]
418418
impl crate::Writable for #regspec_ty {
419-
const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = #zero_to_modify_fields_bitmap;
420-
const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = #one_to_modify_fields_bitmap;
419+
const ZERO_TO_MODIFY_FIELDS_BITMAP: #rty = #zero_to_modify_fields_bitmap;
420+
const ONE_TO_MODIFY_FIELDS_BITMAP: #rty = #one_to_modify_fields_bitmap;
421421
}
422422
});
423423
}
@@ -426,7 +426,7 @@ pub fn render_register_mod(
426426
mod_items.extend(quote! {
427427
#[doc = #doc]
428428
impl crate::Resettable for #regspec_ty {
429-
const RESET_VALUE: Self::Ux = #rv;
429+
const RESET_VALUE: #rty = #rv;
430430
}
431431
});
432432
}

0 commit comments

Comments
 (0)