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
In below listing the assignment line I think should not compile with error like "invalid left-hand side expression" - as it would be in case variable was not a struct.
PS: Moving const definition to the function body does not change anything.
pubstructFoo{bar:bool,}constCONF:Foo = Foo{bar:false};fnmain(){println!("main 0 {}",CONF.bar);// prints false - OK// This does compile ?!?CONF.bar = true;println!("main 1 {}",CONF.bar);// prints false - ?!?}