Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add #![feature(param_attrs)] to enable exception example
On rust V1.39 nightly, at least, the exceptions example gives an error. Adding a line to the example allows it to run.
  • Loading branch information
bobgates committed Mar 25, 2020
commit 44ef7e8b992a8bbe69b0e0ac9f0fd6dc21ee66f6
4 changes: 3 additions & 1 deletion src/start/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ possible.
Here's an example that uses the system timer to raise a `SysTick` exception
roughly every second. The `SysTick` exception handler keeps track of how many
times it has been called in the `COUNT` variable and then prints the value of
`COUNT` to the host console using semihosting.
`COUNT` to the host console using semihosting. The exception
macro currently (Rust 1.39.0 nightly) creates an error - ```error[E0658]: attributes on function parameters are unstable```. This can be avoided by using the inner attribute ```#![feature(param_attrs)]```.

> **NOTE**: You can run this example on any Cortex-M device; you can also run it
> on QEMU
Expand All @@ -61,6 +62,7 @@ times it has been called in the `COUNT` variable and then prints the value of
#![deny(unsafe_code)]
#![no_main]
#![no_std]
#![feature(param_attrs)]

extern crate panic_halt;

Expand Down