#Covariance rules with mutable stuff is KILLING ME
5 messages · Page 1 of 1 (latest)
yeah if Smth is covariant in its lifetime
it doesn't depend only on Cell
?play ```rs
use std::cell::Cell;
#[derive(Clone, Copy)]
struct Smth<'a>(&'a i32);
fn foo<'a>(c: &Cell<Smth<'a>>, c2: Cell<Smth<'static>>) {
c.set(c2.get());
}