diff --git a/crates/fayalite/tests/ui/simvalue_is_not_internable.stderr b/crates/fayalite/tests/ui/simvalue_is_not_internable.stderr index 6550b5f8..030500bb 100644 --- a/crates/fayalite/tests/ui/simvalue_is_not_internable.stderr +++ b/crates/fayalite/tests/ui/simvalue_is_not_internable.stderr @@ -45,6 +45,64 @@ note: required by a bound in `fayalite::intern::Interned` | pub struct Interned { | ^^^^ required by this bound in `Interned` +error[E0277]: `NonNull<()>` cannot be sent between threads safely + --> tests/ui/simvalue_is_not_internable.rs:11:26 + | +11 | fn f(v: SimValue<()>) -> Interned> { + | ^^^^^^^^^^^^^^^^^^^^^^ `NonNull<()>` cannot be sent between threads safely + | + = help: within `SimValue<()>`, the trait `Send` is not implemented for `NonNull<()>` +note: required because it appears within the type `DynSimOnlyValue` + --> src/sim/value/sim_only_value_unsafe.rs + | + | pub struct DynSimOnlyValue { + | ^^^^^^^^^^^^^^^ +note: required because it appears within the type `PhantomData` + --> $RUST/core/src/marker.rs + | + | pub struct PhantomData; + | ^^^^^^^^^^^ +note: required because it appears within the type `alloc::raw_vec::RawVec` + --> $RUST/alloc/src/raw_vec/mod.rs + | + | pub(crate) struct RawVec { + | ^^^^^^ +note: required because it appears within the type `Vec` + --> $RUST/alloc/src/vec/mod.rs + | + | pub struct Vec { + | ^^^ +note: required because it appears within the type `OpaqueSimValue` + --> src/ty.rs + | + | pub struct OpaqueSimValue { + | ^^^^^^^^^^^^^^ +note: required because it appears within the type `value::SimValueInner<()>` + --> src/sim/value.rs + | + | struct SimValueInner { + | ^^^^^^^^^^^^^ +note: required because it appears within the type `UnsafeCell>` + --> $RUST/core/src/cell.rs + | + | pub struct 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 | @@ -138,6 +196,73 @@ help: consider dereferencing here 12 | Intern::intern_sized(*v) | + +error[E0277]: `NonNull<()>` cannot be sent between threads safely + --> tests/ui/simvalue_is_not_internable.rs:12:26 + | +12 | Intern::intern_sized(v) + | -------------------- ^ `NonNull<()>` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | + = help: within `SimValue<()>`, the trait `Send` is not implemented for `NonNull<()>` +note: required because it appears within the type `DynSimOnlyValue` + --> src/sim/value/sim_only_value_unsafe.rs + | + | pub struct DynSimOnlyValue { + | ^^^^^^^^^^^^^^^ +note: required because it appears within the type `PhantomData` + --> $RUST/core/src/marker.rs + | + | pub struct PhantomData; + | ^^^^^^^^^^^ +note: required because it appears within the type `alloc::raw_vec::RawVec` + --> $RUST/alloc/src/raw_vec/mod.rs + | + | pub(crate) struct RawVec { + | ^^^^^^ +note: required because it appears within the type `Vec` + --> $RUST/alloc/src/vec/mod.rs + | + | pub struct Vec { + | ^^^ +note: required because it appears within the type `OpaqueSimValue` + --> src/ty.rs + | + | pub struct OpaqueSimValue { + | ^^^^^^^^^^^^^^ +note: required because it appears within the type `value::SimValueInner<()>` + --> src/sim/value.rs + | + | struct SimValueInner { + | ^^^^^^^^^^^^^ +note: required because it appears within the type `UnsafeCell>` + --> $RUST/core/src/cell.rs + | + | pub struct 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 | @@ -184,3 +309,61 @@ note: required by a bound in `fayalite::intern::Interned` | | pub struct Interned { | ^^^^ required by this bound in `Interned` + +error[E0277]: `NonNull<()>` cannot be sent between threads safely + --> tests/ui/simvalue_is_not_internable.rs:12:5 + | +12 | Intern::intern_sized(v) + | ^^^^^^^^^^^^^^^^^^^^^^^ `NonNull<()>` cannot be sent between threads safely + | + = help: within `SimValue<()>`, the trait `Send` is not implemented for `NonNull<()>` +note: required because it appears within the type `DynSimOnlyValue` + --> src/sim/value/sim_only_value_unsafe.rs + | + | pub struct DynSimOnlyValue { + | ^^^^^^^^^^^^^^^ +note: required because it appears within the type `PhantomData` + --> $RUST/core/src/marker.rs + | + | pub struct PhantomData; + | ^^^^^^^^^^^ +note: required because it appears within the type `alloc::raw_vec::RawVec` + --> $RUST/alloc/src/raw_vec/mod.rs + | + | pub(crate) struct RawVec { + | ^^^^^^ +note: required because it appears within the type `Vec` + --> $RUST/alloc/src/vec/mod.rs + | + | pub struct Vec { + | ^^^ +note: required because it appears within the type `OpaqueSimValue` + --> src/ty.rs + | + | pub struct OpaqueSimValue { + | ^^^^^^^^^^^^^^ +note: required because it appears within the type `value::SimValueInner<()>` + --> src/sim/value.rs + | + | struct SimValueInner { + | ^^^^^^^^^^^^^ +note: required because it appears within the type `UnsafeCell>` + --> $RUST/core/src/cell.rs + | + | pub struct 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`