From 148ad4045e36f3c1d11d2708494c7628b3838df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 22 Apr 2020 12:10:43 +0000 Subject: Update documentation where const is replaced by mod --- macros/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'macros/src/lib.rs') diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 7b72c7f..2a439e1 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -15,8 +15,7 @@ mod tests; /// Attribute used to declare a RTIC application /// -/// This attribute must be applied to a `const` item of type `()`. The `const` item is effectively -/// used as a `mod` item: its value must be a block that contains items commonly found in modules, +/// This attribute must be applied to a module block that contains items commonly found in modules, /// like functions and `static` variables. /// /// The `app` attribute has one mandatory argument: @@ -34,7 +33,7 @@ mod tests; /// - `monotonic = `. This is a path to a zero-sized structure (e.g. `struct Foo;`) that /// implements the `Monotonic` trait. This argument must be provided to use the `schedule` API. /// -/// The items allowed in the block value of the `const` item are specified below: +/// The items allowed in the module block are specified below: /// /// # 1. `struct Resources` /// -- cgit v1.2.3 From 487fea45ce15ea375192f72ddb148dda8414873b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 4 Jun 2020 15:43:16 +0000 Subject: Keep user code as-is within the module, add example --- macros/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'macros/src/lib.rs') diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 2a439e1..94e7eec 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -35,7 +35,8 @@ mod tests; /// /// The items allowed in the module block are specified below: /// -/// # 1. `struct Resources` +/// # 1. `#[resources] +/// struct ` /// /// This structure contains the declaration of all the resources used by the application. Each field /// in this structure corresponds to a different resource. Each resource may optionally be given an -- cgit v1.2.3 From 8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 5 Oct 2020 20:19:52 +0200 Subject: Added back accidentally removed block --- macros/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'macros/src/lib.rs') diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 94e7eec..e659559 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -35,8 +35,7 @@ mod tests; /// /// The items allowed in the module block are specified below: /// -/// # 1. `#[resources] -/// struct ` +/// # 1. `#[resources] struct ` /// /// This structure contains the declaration of all the resources used by the application. Each field /// in this structure corresponds to a different resource. Each resource may optionally be given an -- cgit v1.2.3