You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InvariantLifetime doesn't have this example (atm), and, the example only makes sense with InvariantType since there's no lifetimes involved in the definition of the Cell type. I do think the example could probably have a little more description, but I don't think it's wrong.
For reference, it currently says:
/// The Cell type is an example which uses unsafe code to achieve/// "interior" mutability:////// ```/// struct Cell<T> { value: T }/// ```////// The type system would infer that `value` is only read here and/// never written, but in fact `Cell` uses unsafe code to achieve/// interior mutability.
http://doc.rust-lang.org/std/kinds/marker/struct.InvariantType.html
It starts talking about cell for some reason. I think this was copy + pasted from InvariantLifetime and never updated.
The text was updated successfully, but these errors were encountered: