Skip to content

Commit 44dde42

Browse files
committed
move doc
1 parent 55a1651 commit 44dde42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generate/register.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ pub fn render(
158158
pub struct #_name_pc;
159159
});
160160

161-
let doc = format!("`read()` method returns [{0}::R]({0}::R) reader structure", &name_sc);
162161
if can_read {
162+
let doc = format!("`read()` method returns [{0}::R]({0}::R) reader structure", &name_sc);
163163
out.push(quote! {
164164
#[doc = #doc]
165165
impl crate::Readable for #name_pc {}
166166
});
167167
}
168-
let doc = format!("`write(|w| ..)` method takes [{0}::W]({0}::W) writer structure", &name_sc);
169168
if can_write {
169+
let doc = format!("`write(|w| ..)` method takes [{0}::W]({0}::W) writer structure", &name_sc);
170170
out.push(quote! {
171171
#[doc = #doc]
172172
impl crate::Writable for #name_pc {}

0 commit comments

Comments
 (0)