error[E0277]: `Cell` cannot be shared between threads safely --> tests/ui/simvalue_is_not_internable.rs:11:26 | 11 | fn f(v: SimValue<()>) -> Interned> { | ^^^^^^^^^^^^^^^^^^^^^^ `Cell` cannot be shared between threads safely | = help: within `SimValue<()>`, the trait `Sync` is not implemented for `Cell` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` note: required because it appears within the type `util::alternating_cell::AlternatingCell>` --> src/util/alternating_cell.rs | | pub(crate) struct AlternatingCell { | ^^^^^^^^^^^^^^^ note: required because it appears within the type `SimValue<()>` --> src/sim/value.rs | | pub struct SimValue { | ^^^^^^^^ note: required by a bound in `fayalite::intern::Interned` --> src/intern.rs | | pub struct Interned { | ^^^^ required by this bound in `Interned` error[E0277]: `UnsafeCell>` cannot be shared between threads safely --> tests/ui/simvalue_is_not_internable.rs:11:26 | 11 | fn f(v: SimValue<()>) -> Interned> { | ^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell>` cannot be shared between threads safely | = help: within `SimValue<()>`, the trait `Sync` is not implemented for `UnsafeCell>` note: required because it appears within the type `util::alternating_cell::AlternatingCell>` --> src/util/alternating_cell.rs | | pub(crate) struct AlternatingCell { | ^^^^^^^^^^^^^^^ note: required because it appears within the type `SimValue<()>` --> src/sim/value.rs | | pub struct SimValue { | ^^^^^^^^ note: required by a bound in `fayalite::intern::Interned` --> src/intern.rs | | pub struct Interned { | ^^^^ required by this bound in `Interned` error[E0277]: the trait bound `SimValue<()>: Intern` is not satisfied --> tests/ui/simvalue_is_not_internable.rs:12:26 | 12 | Intern::intern_sized(v) | -------------------- ^ the trait `Hash` is not implemented for `SimValue<()>` | | | required by a bound introduced by this call | = note: required for `SimValue<()>` to implement `Intern` help: consider dereferencing here | 12 | Intern::intern_sized(*v) | + error[E0277]: the trait bound `SimValue<()>: Intern` is not satisfied --> tests/ui/simvalue_is_not_internable.rs:12:26 | 12 | Intern::intern_sized(v) | -------------------- ^ the trait `std::cmp::Eq` is not implemented for `SimValue<()>` | | | required by a bound introduced by this call | = note: required for `SimValue<()>` to implement `Intern` help: consider dereferencing here | 12 | Intern::intern_sized(*v) | + error[E0277]: `Cell` cannot be shared between threads safely --> tests/ui/simvalue_is_not_internable.rs:12:26 | 12 | Intern::intern_sized(v) | -------------------- ^ `Cell` cannot be shared between threads safely | | | required by a bound introduced by this call | = help: within `SimValue<()>`, the trait `Sync` is not implemented for `Cell` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` note: required because it appears within the type `util::alternating_cell::AlternatingCell>` --> src/util/alternating_cell.rs | | pub(crate) struct AlternatingCell { | ^^^^^^^^^^^^^^^ note: required because it appears within the type `SimValue<()>` --> src/sim/value.rs | | pub struct SimValue { | ^^^^^^^^ note: required by a bound in `intern_sized` --> src/intern.rs | | pub trait Intern: Any + Send + Sync { | ^^^^ required by this bound in `Intern::intern_sized` | fn intern(&self) -> Interned; | fn intern_sized(self) -> Interned | ------------ required by a bound in this associated function help: consider dereferencing here | 12 | Intern::intern_sized(*v) | + error[E0277]: `UnsafeCell>` cannot be shared between threads safely --> tests/ui/simvalue_is_not_internable.rs:12:26 | 12 | Intern::intern_sized(v) | -------------------- ^ `UnsafeCell>` cannot be shared between threads safely | | | required by a bound introduced by this call | = help: within `SimValue<()>`, the trait `Sync` is not implemented for `UnsafeCell>` note: required because it appears within the type `util::alternating_cell::AlternatingCell>` --> src/util/alternating_cell.rs | | pub(crate) struct AlternatingCell { | ^^^^^^^^^^^^^^^ note: required because it appears within the type `SimValue<()>` --> src/sim/value.rs | | pub struct SimValue { | ^^^^^^^^ note: required by a bound in `intern_sized` --> src/intern.rs | | pub trait Intern: Any + Send + Sync { | ^^^^ required by this bound in `Intern::intern_sized` | fn intern(&self) -> Interned; | fn intern_sized(self) -> Interned | ------------ required by a bound in this associated function help: consider dereferencing here | 12 | Intern::intern_sized(*v) | + error[E0277]: `Cell` cannot be shared between threads safely --> tests/ui/simvalue_is_not_internable.rs:12:5 | 12 | Intern::intern_sized(v) | ^^^^^^^^^^^^^^^^^^^^^^^ `Cell` cannot be shared between threads safely | = help: within `SimValue<()>`, the trait `Sync` is not implemented for `Cell` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` note: required because it appears within the type `util::alternating_cell::AlternatingCell>` --> src/util/alternating_cell.rs | | pub(crate) struct AlternatingCell { | ^^^^^^^^^^^^^^^ note: required because it appears within the type `SimValue<()>` --> src/sim/value.rs | | pub struct SimValue { | ^^^^^^^^ note: required by a bound in `fayalite::intern::Interned` --> src/intern.rs | | pub struct Interned { | ^^^^ required by this bound in `Interned` error[E0277]: `UnsafeCell>` cannot be shared between threads safely --> tests/ui/simvalue_is_not_internable.rs:12:5 | 12 | Intern::intern_sized(v) | ^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell>` cannot be shared between threads safely | = help: within `SimValue<()>`, the trait `Sync` is not implemented for `UnsafeCell>` note: required because it appears within the type `util::alternating_cell::AlternatingCell>` --> src/util/alternating_cell.rs | | pub(crate) struct AlternatingCell { | ^^^^^^^^^^^^^^^ note: required because it appears within the type `SimValue<()>` --> src/sim/value.rs | | pub struct SimValue { | ^^^^^^^^ note: required by a bound in `fayalite::intern::Interned` --> src/intern.rs | | pub struct Interned { | ^^^^ required by this bound in `Interned`