aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Tran <[email protected]>2025-03-29 02:45:38 -0500
committerMatthew Tran <[email protected]>2025-03-29 02:46:32 -0500
commitc72e2c5d100fd42acdd3a39f6250c112c2a37495 (patch)
tree68b18844ba85998c88614f38c49a6d93a0801054
parent954d1554d4c04a245adadb5ebd97205d1442635e (diff)
Add test
-rw-r--r--embassy-executor/tests/ui.rs1
-rw-r--r--embassy-executor/tests/ui/type_error.rs8
-rw-r--r--embassy-executor/tests/ui/type_error.stderr7
3 files changed, 16 insertions, 0 deletions
diff --git a/embassy-executor/tests/ui.rs b/embassy-executor/tests/ui.rs
index be4679485..278a4b903 100644
--- a/embassy-executor/tests/ui.rs
+++ b/embassy-executor/tests/ui.rs
@@ -19,5 +19,6 @@ fn ui() {
19 t.compile_fail("tests/ui/not_async.rs"); 19 t.compile_fail("tests/ui/not_async.rs");
20 t.compile_fail("tests/ui/self_ref.rs"); 20 t.compile_fail("tests/ui/self_ref.rs");
21 t.compile_fail("tests/ui/self.rs"); 21 t.compile_fail("tests/ui/self.rs");
22 t.compile_fail("tests/ui/type_error.rs");
22 t.compile_fail("tests/ui/where_clause.rs"); 23 t.compile_fail("tests/ui/where_clause.rs");
23} 24}
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]
4async fn task() {
5 5
6}
7
8fn 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 @@
1error[E0308]: mismatched types
2 --> tests/ui/type_error.rs:5:5
3 |
44 | async fn task() {
5 | - help: try adding a return type: `-> i32`
65 | 5
7 | ^ expected `()`, found integer