-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(macros): improve
spawner
macro errors (#327)
- Loading branch information
Showing
2 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
src/riot-rs-macros/tests/ui/spawner/missing_peripherals_param.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
error: custom attribute panicked | ||
error: `peripherals` macro parameter missing here ... | ||
--> tests/ui/spawner/missing_peripherals_param.rs:10:1 | ||
| | ||
10 | #[riot_rs::spawner(autostart)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: message: to provide this function with peripherals, use the `peripherals` macro parameter | ||
= note: this error originates in the attribute macro `riot_rs::spawner` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: ... because this function has a second parameter | ||
--> tests/ui/spawner/missing_peripherals_param.rs:11:9 | ||
| | ||
11 | fn main(_spawner: Spawner, _peripherals: Peripherals) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |