| 1 |
error[E0277]: `RefCell<std::string::String>` cannot be shared between threads safely |
| 2 |
--> tests/subclass_compiletest/05-no-auto-send-sync-with-non-send-sync-parent.rs:70:11 |
| 3 |
| |
| 4 |
70 | check(&obj); |
| 5 |
| ----- ^^^^ `RefCell<std::string::String>` cannot be shared between threads safely |
| 6 |
| | |
| 7 |
| required by a bound introduced by this call |
| 8 |
| |
| 9 |
= help: within `imp_parent::TestParent`, the trait `Sync` is not implemented for `RefCell<std::string::String>` |
| 10 |
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead |
| 11 |
note: required because it appears within the type `imp_parent::TestParent` |
| 12 |
--> tests/subclass_compiletest/05-no-auto-send-sync-with-non-send-sync-parent.rs:6:16 |
| 13 |
| |
| 14 |
6 | pub struct TestParent { |
| 15 |
| ^^^^^^^^^^ |
| 16 |
= note: required for `TypedObjectRef<imp_parent::TestParent, ()>` to implement `Send` |
| 17 |
note: required because it appears within the type `TestParent` |
| 18 |
--> tests/subclass_compiletest/05-no-auto-send-sync-with-non-send-sync-parent.rs:20:16 |
| 19 |
| |
| 20 |
20 | pub struct TestParent(ObjectSubclass<imp_parent::TestParent>); |
| 21 |
| ^^^^^^^^^^ |
| 22 |
= note: required for `TypedObjectRef<imp_object::TestObject, TestParent>` to implement `Send` |
| 23 |
note: required because it appears within the type `TestObject` |
| 24 |
--> tests/subclass_compiletest/05-no-auto-send-sync-with-non-send-sync-parent.rs:57:16 |
| 25 |
| |
| 26 |
57 | pub struct TestObject(ObjectSubclass<imp_object::TestObject>) @extends TestParent; |
| 27 |
| ^^^^^^^^^^ |
| 28 |
note: required by a bound in `main::check` |
| 29 |
--> tests/subclass_compiletest/05-no-auto-send-sync-with-non-send-sync-parent.rs:67:17 |
| 30 |
| |
| 31 |
67 | fn check<T: Send + Sync>(_obj: &T) {} |
| 32 |
| ^^^^ required by this bound in `check` |