| 1 |
error[E0277]: `RefCell<std::string::String>` cannot be shared between threads safely |
| 2 |
--> tests/subclass_compiletest/02-no-auto-send-sync.rs:33:11 |
| 3 |
| |
| 4 |
33 | 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::TestObject`, 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::TestObject` |
| 12 |
--> tests/subclass_compiletest/02-no-auto-send-sync.rs:6:16 |
| 13 |
| |
| 14 |
6 | pub struct TestObject { |
| 15 |
| ^^^^^^^^^^ |
| 16 |
= note: required for `TypedObjectRef<imp::TestObject, ()>` to implement `Send` |
| 17 |
note: required because it appears within the type `TestObject` |
| 18 |
--> tests/subclass_compiletest/02-no-auto-send-sync.rs:20:16 |
| 19 |
| |
| 20 |
20 | pub struct TestObject(ObjectSubclass<imp::TestObject>); |
| 21 |
| ^^^^^^^^^^ |
| 22 |
note: required by a bound in `main::check` |
| 23 |
--> tests/subclass_compiletest/02-no-auto-send-sync.rs:30:17 |
| 24 |
| |
| 25 |
30 | fn check<T: Send>(_obj: &T) {} |
| 26 |
| ^^^^ required by this bound in `check` |