Skip to content

Commit a49cb00

Browse files
committed
Hide all the auto-generated trampolines from the docs.
You shouldn't call them, so don't list them. Now the exception handlers match the main function.
1 parent 19c9159 commit a49cb00

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cortex-ar-rt-macros/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ impl std::fmt::Display for Exception {
143143
/// You get something like:
144144
///
145145
/// ```rust
146+
/// #[doc(hidden)]
146147
/// #[export_name = "_undefined_handler"]
147148
/// pub unsafe extern "C" fn __cortex_ar_rt_undefined_handler(addr: usize) -> ! {
148149
/// foo(addr)
@@ -182,6 +183,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
182183
/// You get something like:
183184
///
184185
/// ```rust
186+
/// #[doc(hidden)]
185187
/// #[export_name = "_irq_handler"]
186188
/// pub unsafe extern "C" fn __cortex_ar_rt_irq_handler(addr: usize) -> ! {
187189
/// foo(addr)
@@ -306,6 +308,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
306308
quote!(
307309
#(#cfgs)*
308310
#(#attrs)*
311+
#[doc(hidden)]
309312
#[export_name = "_undefined_handler"]
310313
pub unsafe extern "C" fn #tramp_ident(addr: usize) -> ! {
311314
#ident(addr)
@@ -317,6 +320,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
317320
quote!(
318321
#(#cfgs)*
319322
#(#attrs)*
323+
#[doc(hidden)]
320324
#[export_name = "_undefined_handler"]
321325
pub unsafe extern "C" fn #tramp_ident(addr: usize) -> usize {
322326
unsafe {
@@ -337,6 +341,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
337341
quote!(
338342
#(#cfgs)*
339343
#(#attrs)*
344+
#[doc(hidden)]
340345
#[export_name = "_prefetch_abort_handler"]
341346
pub unsafe extern "C" fn #tramp_ident(addr: usize) -> ! {
342347
#ident(addr)
@@ -348,6 +353,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
348353
quote!(
349354
#(#cfgs)*
350355
#(#attrs)*
356+
#[doc(hidden)]
351357
#[export_name = "_prefetch_abort_handler"]
352358
pub unsafe extern "C" fn #tramp_ident(addr: usize) -> usize {
353359
unsafe {
@@ -367,6 +373,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
367373
quote!(
368374
#(#cfgs)*
369375
#(#attrs)*
376+
#[doc(hidden)]
370377
#[export_name = "_data_abort_handler"]
371378
pub unsafe extern "C" fn #tramp_ident(addr: usize) -> ! {
372379
#ident(addr)
@@ -378,6 +385,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
378385
quote!(
379386
#(#cfgs)*
380387
#(#attrs)*
388+
#[doc(hidden)]
381389
#[export_name = "_data_abort_handler"]
382390
pub unsafe extern "C" fn #tramp_ident(addr: usize) -> usize {
383391
unsafe {
@@ -395,6 +403,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
395403
quote!(
396404
#(#cfgs)*
397405
#(#attrs)*
406+
#[doc(hidden)]
398407
#[export_name = "_svc_handler"]
399408
pub unsafe extern "C" fn #tramp_ident(arg: u32) {
400409
#ident(arg)
@@ -409,6 +418,7 @@ fn handle_exception_interrupt(args: TokenStream, input: TokenStream, kind: Kind)
409418
quote!(
410419
#(#cfgs)*
411420
#(#attrs)*
421+
#[doc(hidden)]
412422
#[export_name = "_irq_handler"]
413423
pub unsafe extern "C" fn #tramp_ident() {
414424
#ident()

0 commit comments

Comments
 (0)