diff options
| author | Dion Dokter <[email protected]> | 2025-11-20 13:22:38 +0100 |
|---|---|---|
| committer | Dion Dokter <[email protected]> | 2025-11-20 13:22:38 +0100 |
| commit | 4f2c36e447455e8d33607d586859d3d075cabf1d (patch) | |
| tree | 003cd822d688acd7c074dd229663b4648d100f71 /embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr | |
| parent | 663732d85abbae400f2dbab2c411802a5b60e9b1 (diff) | |
| parent | 661874d11de7d93ed52e08e020a9d4c7ee11122d (diff) | |
Merge branch 'main' into u0-lcd
Diffstat (limited to 'embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr')
| -rw-r--r-- | embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr b/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr new file mode 100644 index 000000000..417fb8e31 --- /dev/null +++ b/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | error[E0277]: `*const u8` cannot be shared between threads safely | ||
| 2 | --> tests/ui/sync_impl/lazy_lock_function.rs:8:16 | ||
| 3 | | | ||
| 4 | 6 | let closure_capturing_non_sync_variable = || unsafe { core::ptr::read(x_ptr) }; | ||
| 5 | | -- within this `{closure@$DIR/tests/ui/sync_impl/lazy_lock_function.rs:6:47: 6:49}` | ||
| 6 | 7 | | ||
| 7 | 8 | check_sync(LazyLock::new(closure_capturing_non_sync_variable)); | ||
| 8 | | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const u8` cannot be shared between threads safely | ||
| 9 | | | | ||
| 10 | | required by a bound introduced by this call | ||
| 11 | | | ||
| 12 | = help: within `{closure@$DIR/tests/ui/sync_impl/lazy_lock_function.rs:6:47: 6:49}`, the trait `Sync` is not implemented for `*const u8` | ||
| 13 | = note: required because it appears within the type `&*const u8` | ||
| 14 | note: required because it's used within this closure | ||
| 15 | --> tests/ui/sync_impl/lazy_lock_function.rs:6:47 | ||
| 16 | | | ||
| 17 | 6 | let closure_capturing_non_sync_variable = || unsafe { core::ptr::read(x_ptr) }; | ||
| 18 | | ^^ | ||
| 19 | = note: required for `embassy_sync::lazy_lock::LazyLock<u8, {closure@$DIR/tests/ui/sync_impl/lazy_lock_function.rs:6:47: 6:49}>` to implement `Sync` | ||
| 20 | note: required by a bound in `check_sync` | ||
| 21 | --> tests/ui/sync_impl/lazy_lock_function.rs:11:18 | ||
| 22 | | | ||
| 23 | 11 | fn check_sync<T: Sync>(_lazy_lock: T) {} | ||
| 24 | | ^^^^ required by this bound in `check_sync` | ||
