From 6dd2a9f002b2de0c61fbdaf6d88017f28a4211f3 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Mon, 20 Mar 2023 14:24:44 +0000 Subject: [PATCH] Mention why we need `extern crate panic_halt`. --- src/bare-metal/alloc.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bare-metal/alloc.md b/src/bare-metal/alloc.md index 63484b82..989bfb65 100644 --- a/src/bare-metal/alloc.md +++ b/src/bare-metal/alloc.md @@ -15,5 +15,7 @@ To use `alloc` you must implement a allocate regions of up to 2**32 bytes. * If any crate in your dependency tree depends on `alloc` then you must have exactly one global allocator defined in your binary. Usually this is done in the top-level binary crate. +* `extern crate panic_halt as _` is necessary to ensure that the `panic_halt` crate is linked in so + we get its panic handler.