diff options
| author | Matthew Tran <[email protected]> | 2025-03-29 02:45:38 -0500 |
|---|---|---|
| committer | Matthew Tran <[email protected]> | 2025-03-29 02:46:32 -0500 |
| commit | c72e2c5d100fd42acdd3a39f6250c112c2a37495 (patch) | |
| tree | 68b18844ba85998c88614f38c49a6d93a0801054 /embassy-executor/tests/ui | |
| parent | 954d1554d4c04a245adadb5ebd97205d1442635e (diff) | |
Add test
Diffstat (limited to 'embassy-executor/tests/ui')
| -rw-r--r-- | embassy-executor/tests/ui/type_error.rs | 8 | ||||
| -rw-r--r-- | embassy-executor/tests/ui/type_error.stderr | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/embassy-executor/tests/ui/type_error.rs b/embassy-executor/tests/ui/type_error.rs new file mode 100644 index 000000000..1734bc6c4 --- /dev/null +++ b/embassy-executor/tests/ui/type_error.rs | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #![cfg_attr(feature = "nightly", feature(impl_trait_in_assoc_type))] | ||
| 2 | |||
| 3 | #[embassy_executor::task] | ||
| 4 | async fn task() { | ||
| 5 | 5 | ||
| 6 | } | ||
| 7 | |||
| 8 | fn main() {} | ||
diff --git a/embassy-executor/tests/ui/type_error.stderr b/embassy-executor/tests/ui/type_error.stderr new file mode 100644 index 000000000..bce315811 --- /dev/null +++ b/embassy-executor/tests/ui/type_error.stderr | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | error[E0308]: mismatched types | ||
| 2 | --> tests/ui/type_error.rs:5:5 | ||
| 3 | | | ||
| 4 | 4 | async fn task() { | ||
| 5 | | - help: try adding a return type: `-> i32` | ||
| 6 | 5 | 5 | ||
| 7 | | ^ expected `()`, found integer | ||
