aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr
diff options
context:
space:
mode:
author1-rafael-1 <[email protected]>2025-09-15 20:07:18 +0200
committer1-rafael-1 <[email protected]>2025-09-15 20:07:18 +0200
commit6bb3d2c0720fa082f27d3cdb70f516058497ec87 (patch)
tree5a1e255cff999b00800f203b91a759c720c973e5 /embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr
parenteb685574601d98c44faed9a3534d056199b46e20 (diff)
parent92a6fd2946f2cbb15359290f68aa360953da2ff7 (diff)
Merge branch 'main' into rp2040-rtc-alarm
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.stderr24
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..daf79ad28
--- /dev/null
+++ b/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr
@@ -0,0 +1,24 @@
1error[E0277]: `*const u8` cannot be shared between threads safely
2 --> tests/ui/sync_impl/lazy_lock_function.rs:8:16
3 |
46 | 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}`
67 |
78 | 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`
14note: required because it's used within this closure
15 --> tests/ui/sync_impl/lazy_lock_function.rs:6:47
16 |
176 | 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`
20note: required by a bound in `check_sync`
21 --> tests/ui/sync_impl/lazy_lock_function.rs:11:18
22 |
2311 | fn check_sync<T: Sync>(_lazy_lock: T) {}
24 | ^^^^ required by this bound in `check_sync`