diff options
| author | Matthew Tran <[email protected]> | 2025-06-01 10:32:24 -0500 |
|---|---|---|
| committer | Matthew Tran <[email protected]> | 2025-06-01 10:32:24 -0500 |
| commit | 0d83fbbb57cf17186a1b8f40f57ef7a35b3e9627 (patch) | |
| tree | 77b20ca5cb38324dd69d77bb1761ef6f9217008e /embassy-executor/src/lib.rs | |
| parent | b06a708f81d208236763a121797807fd5b48aee6 (diff) | |
Add diagnostic::on_unimplemented for nightly
Diffstat (limited to 'embassy-executor/src/lib.rs')
| -rw-r--r-- | embassy-executor/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index e26e8ee7d..e174a0594 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs | |||
| @@ -233,6 +233,10 @@ pub mod _export { | |||
| 233 | #[doc(hidden)] | 233 | #[doc(hidden)] |
| 234 | #[cfg(feature = "nightly")] | 234 | #[cfg(feature = "nightly")] |
| 235 | pub mod _export { | 235 | pub mod _export { |
| 236 | #[diagnostic::on_unimplemented( | ||
| 237 | message = "task futures must resolve to `()` or `!`", | ||
| 238 | note = "use `async fn` or change the return type to `impl Future<Output = ()>`" | ||
| 239 | )] | ||
| 236 | pub trait TaskReturnValue {} | 240 | pub trait TaskReturnValue {} |
| 237 | impl TaskReturnValue for () {} | 241 | impl TaskReturnValue for () {} |
| 238 | impl TaskReturnValue for Never {} | 242 | impl TaskReturnValue for Never {} |
