From 95e091421023e627ccb483971d1e418f11d79459 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 15 Dec 2020 17:02:30 +0100 Subject: [PATCH] document conflicts --- book/src/panic.md | 4 ++++ book/src/timestamp.md | 4 ++++ src/lib.rs | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/book/src/panic.md b/book/src/panic.md index 2f2c4db1..a0463961 100644 --- a/book/src/panic.md +++ b/book/src/panic.md @@ -38,3 +38,7 @@ fn defmt_panic() -> ! { If you are using the `panic-probe` crate then you should "abort" (call `cortex_m::asm::udf`) from `#[defmt::panic_handler]` to match its behavior. NOTE: even if you don't run into the "double panic message printed" issue you may still want to use `#[defmt::panic_handler]` because this way `defmt::panic` and `defmt::assert` will *not* go through the `core::panic` machinery and that *may* reduce code size (we recommend you measure the effect of the change). + +## Inter-operation with built-in attributes + +The `#[panic_handler]` attribute cannot be used together with the `export_name` or `no_mangle` attributes diff --git a/book/src/timestamp.md b/book/src/timestamp.md index dda6d8e8..feebf199 100644 --- a/book/src/timestamp.md +++ b/book/src/timestamp.md @@ -96,3 +96,7 @@ count: u64 <- (high1 << 32) | low ``` The loop should be kept as tight as possible and the read operations must be single-instruction operations. + +## Inter-operation with built-in attributes + +The `#[timestamp]` attribute cannot be used together with the `export_name` or `no_mangle` attributes diff --git a/src/lib.rs b/src/lib.rs index 981225be..31ea56ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -160,6 +160,10 @@ pub use defmt_macros::unwrap; /// this macro. See [the manual] for details. /// /// [the manual]: https://defmt.ferrous-systems.com/panic.html +/// +/// # Inter-operation with built-in attributes +/// +/// This attribute cannot be used together with the `export_name` or `no_mangle` attributes pub use defmt_macros::panic_handler; /// Creates an interned string ([`Str`]) from a string literal. @@ -260,6 +264,10 @@ pub use defmt_macros::global_logger; /// 0 /// } /// ``` +/// +/// # Inter-operation with built-in attributes +/// +/// This attribute cannot be used together with the `export_name` or `no_mangle` attributes pub use defmt_macros::timestamp; #[doc(hidden)] // documented as the `Format` trait instead