summaryrefslogtreecommitdiffstats
path: root/src/doc/embedded-book/src/peripherals/singletons.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /src/doc/embedded-book/src/peripherals/singletons.md
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doc/embedded-book/src/peripherals/singletons.md')
-rw-r--r--src/doc/embedded-book/src/peripherals/singletons.md3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/doc/embedded-book/src/peripherals/singletons.md b/src/doc/embedded-book/src/peripherals/singletons.md
index 3f04aa170..1f3a556e8 100644
--- a/src/doc/embedded-book/src/peripherals/singletons.md
+++ b/src/doc/embedded-book/src/peripherals/singletons.md
@@ -61,8 +61,7 @@ This has a small runtime overhead because we must wrap the `SerialPort` structur
Although we created our own `Peripherals` structure above, it is not necessary to do this for your code. the `cortex_m` crate contains a macro called `singleton!()` that will perform this action for you.
```rust,ignore
-#[macro_use(singleton)]
-extern crate cortex_m;
+use cortex_m::singleton;
fn main() {
// OK if `main` is executed only once