These are chat archives for rust-lang/rust

Jun 2017
notsonotso @notsonotso roots for --turn-of-borrowchecker-and-just-use-gc-for-this-module
Scott Corbeil
Jun 08 2017 20:42

Is something like this even possible?

enum Things {

impl Things {
    fn change(&mut self) {
        *self = Things::B;

This is far simpler than what I'm trying to do, but illustrates it well. Reassign self from within a method.

Jonas Platte
Jun 08 2017 20:50
@scorbeil Yeah, should be possible. Your example seems to compile just fine for me too.
Scott Corbeil
Jun 08 2017 20:51
Hm... you are correct. I must have a different issue...
Ashley Mannix
Jun 08 2017 20:55
@scorbeil Are you getting a compile error trying to do something like this in your code?