Skip to content

Commit c3851d8

Browse files
Remove broken doctest/example
This is unsound unless you control the panic handler implementation.
1 parent 7d19e64 commit c3851d8

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

cortex-m-rt/src/lib.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -657,29 +657,13 @@ pub use macros::entry;
657657
///
658658
/// # Examples
659659
///
660-
/// - Setting the `HardFault` handler
661-
///
662-
/// ```
663-
/// # extern crate cortex_m_rt;
664-
/// # extern crate cortex_m_rt_macros;
665-
/// use cortex_m_rt::{ExceptionFrame, exception};
666-
///
667-
/// #[exception]
668-
/// fn HardFault(ef: &ExceptionFrame) -> ! {
669-
/// // prints the exception frame as a panic message
670-
/// panic!("{:#?}", ef);
671-
/// }
672-
///
673-
/// # fn main() {}
674-
/// ```
675-
///
676660
/// - Setting the default handler
677661
///
678662
/// ```
679663
/// use cortex_m_rt::exception;
680664
///
681665
/// #[exception]
682-
/// fn DefaultHandler(irqn: i16) {
666+
/// unsafe fn DefaultHandler(irqn: i16) {
683667
/// println!("IRQn = {}", irqn);
684668
/// }
685669
///

0 commit comments

Comments
 (0)