Files
rust/tests/ui/traits/struct-negative-sync-impl.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
765 B
Plaintext
Raw Normal View History

2025-06-29 23:13:37 +05:00
error[E0277]: `NotSync` cannot be shared between threads safely
--> $DIR/struct-negative-sync-impl.rs:19:19
2018-08-08 14:28:26 +02:00
|
2025-06-29 23:13:37 +05:00
LL | requires_sync(not_sync);
| ------------- ^^^^^^^^ `NotSync` cannot be shared between threads safely
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
help: the trait `Sync` is not implemented for `NotSync`
--> $DIR/struct-negative-sync-impl.rs:9:1
|
LL | struct NotSync {
| ^^^^^^^^^^^^^^
2025-06-29 23:13:37 +05:00
note: required by a bound in `requires_sync`
--> $DIR/struct-negative-sync-impl.rs:15:21
|
2025-06-29 23:13:37 +05:00
LL | fn requires_sync<T: Sync>(_: T) {}
| ^^^^ required by this bound in `requires_sync`
2018-08-08 14:28:26 +02:00
error: aborting due to 1 previous error
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0277`.