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
#![feature(collections)]structFoo{name:String,}fnmain(){letmut x = Foo{name:"Foo".to_string()};drop(x);
x.name = "Bar".to_string();}
even though we're setting a field on a non-copy struct after it has been dropped. If you try to print out x.name, the compiler correctly errors and says that x has been moved, but it doesn't stop you from setting the field.
Tested on rustc 1.0.0-nightly (1d00c545e 2015-01-30 19:56:34 +0000).