@@ -22,9 +22,10 @@ use proc_macro::TokenStream;
22
22
23
23
/// Attribute to declare the entry point of the program
24
24
///
25
- /// **IMPORTANT**: This attribute must be used once in the dependency graph and must be used on a
26
- /// reachable item (i.e. there must be no private modules between the item and the root of the
27
- /// crate). If the item is in the root of the crate you'll be fine.
25
+ /// **IMPORTANT**: This attribute must appear exactly *once* in the dependency graph. Also, if you
26
+ /// are using Rust 1.30 the attribute must be used on a reachable item (i.e. there must be no
27
+ /// private modules between the item and the root of the crate); if the item is in the root of the
28
+ /// crate you'll be fine. This reachability restriction doesn't apply to Rust 1.31 and newer releases.
28
29
///
29
30
/// The specified function will be called by the reset handler *after* RAM has been initialized. In
30
31
/// the case of the `thumbv7em-none-eabihf` target the FPU will also be enabled before the function
@@ -143,9 +144,10 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
143
144
144
145
/// Attribute to declare an exception handler
145
146
///
146
- /// **IMPORTANT**: This attribute must be used on reachable items (i.e. there must be no private
147
- /// modules between the item and the root of the crate). If the item is in the root of the crate
148
- /// you'll be fine.
147
+ /// **IMPORTANT**: If you are using Rust 1.30 this attribute must be used on reachable items (i.e.
148
+ /// there must be no private modules between the item and the root of the crate); if the item is in
149
+ /// the root of the crate you'll be fine. This reachability restriction doesn't apply to Rust 1.31
150
+ /// and newer releases.
149
151
///
150
152
/// # Syntax
151
153
///
@@ -438,9 +440,10 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
438
440
439
441
/// Attribute to declare an interrupt (AKA device-specific exception) handler
440
442
///
441
- /// **IMPORTANT**: This attribute must be used on reachable items (i.e. there must be no private
442
- /// modules between the item and the root of the crate). If the item is in the root of the crate
443
- /// you'll be fine.
443
+ /// **IMPORTANT**: If you are using Rust 1.30 this attribute must be used on reachable items (i.e.
444
+ /// there must be no private modules between the item and the root of the crate); if the item is in
445
+ /// the root of the crate you'll be fine. This reachability restriction doesn't apply to Rust 1.31
446
+ /// and newer releases.
444
447
///
445
448
/// **NOTE**: This attribute is exposed by `cortex-m-rt` only when the `device` feature is enabled.
446
449
/// However, that export is not meant to be used directly -- using it will result in a compilation
@@ -578,9 +581,11 @@ pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
578
581
579
582
/// Attribute to mark which function will be called at the beginning of the reset handler.
580
583
///
581
- /// **IMPORTANT**: This attribute must be used once in the dependency graph and must be used on a
582
- /// reachable item (i.e. there must be no private modules between the item and the root of the
583
- /// crate). If the item is in the root of the crate you'll be fine.
584
+ /// **IMPORTANT**: This attribute can appear at most *once* in the dependency graph. Also, if you
585
+ /// are using Rust 1.30 the attribute must be used on a reachable item (i.e. there must be no
586
+ /// private modules between the item and the root of the crate); if the item is in the root of the
587
+ /// crate you'll be fine. This reachability restriction doesn't apply to Rust 1.31 and newer
588
+ /// releases.
584
589
///
585
590
/// The function must have the signature of `unsafe fn()`.
586
591
///
0 commit comments