Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #![feature(param_attrs)] to enable exception example #231

Closed
wants to merge 1 commit into from
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
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