diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-09-14 15:44:08 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-08-09 14:04:10 +0000 |
| commit | 9de1a472b68ed85f396b2e2cc79c3ef17584d6e1 (patch) | |
| tree | 0e93df76a07e347476929f16ca8da0084d6c18cc /tests/ui/stdlib-unit-tests | |
| parent | 19a647d6d8f6ead984d7b431c4a8376e02c543e6 (diff) | |
| download | rust-9de1a472b68ed85f396b2e2cc79c3ef17584d6e1.tar.gz rust-9de1a472b68ed85f396b2e2cc79c3ef17584d6e1.zip | |
Suggest using `Arc` on `!Send`/`!Sync` types
Diffstat (limited to 'tests/ui/stdlib-unit-tests')
| -rw-r--r-- | tests/ui/stdlib-unit-tests/not-sync.stderr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/stdlib-unit-tests/not-sync.stderr b/tests/ui/stdlib-unit-tests/not-sync.stderr index b9a266e4eb9..2ea08b8b4f4 100644 --- a/tests/ui/stdlib-unit-tests/not-sync.stderr +++ b/tests/ui/stdlib-unit-tests/not-sync.stderr @@ -33,6 +33,7 @@ LL | test::<Rc<i32>>(); | ^^^^^^^ `Rc<i32>` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `Rc<i32>` + = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | @@ -46,6 +47,7 @@ LL | test::<Weak<i32>>(); | ^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `std::rc::Weak<i32>` + = note: consider using `std::sync::Arc<std::rc::Weak<i32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html> note: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | @@ -59,6 +61,7 @@ LL | test::<Receiver<i32>>(); | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<i32>` + = note: consider using `std::sync::Arc<std::sync::mpsc::Receiver<i32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html> note: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | |
