mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-28 04:40:39 +00:00
Add test
This commit is contained in:
parent
954d1554d4
commit
c72e2c5d10
@ -19,5 +19,6 @@ fn ui() {
|
||||
t.compile_fail("tests/ui/not_async.rs");
|
||||
t.compile_fail("tests/ui/self_ref.rs");
|
||||
t.compile_fail("tests/ui/self.rs");
|
||||
t.compile_fail("tests/ui/type_error.rs");
|
||||
t.compile_fail("tests/ui/where_clause.rs");
|
||||
}
|
||||
|
8
embassy-executor/tests/ui/type_error.rs
Normal file
8
embassy-executor/tests/ui/type_error.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#![cfg_attr(feature = "nightly", feature(impl_trait_in_assoc_type))]
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn task() {
|
||||
5
|
||||
}
|
||||
|
||||
fn main() {}
|
7
embassy-executor/tests/ui/type_error.stderr
Normal file
7
embassy-executor/tests/ui/type_error.stderr
Normal file
@ -0,0 +1,7 @@
|
||||
error[E0308]: mismatched types
|
||||
--> tests/ui/type_error.rs:5:5
|
||||
|
|
||||
4 | async fn task() {
|
||||
| - help: try adding a return type: `-> i32`
|
||||
5 | 5
|
||||
| ^ expected `()`, found integer
|
Loading…
x
Reference in New Issue
Block a user