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
foo.drop() currently errors with explicit call to destructor, which is good, but the error does not fire for UFCS-style Drop::drop(&mut foo) calls, leading to the ability to call a value’s destructor more than once:
structBass;implDropforBass{fndrop(&mutself){println!("D-D-D-D-DROP THE BASS");}}fnmain(){letmut bass = Bass;Drop::drop(&mut bass);Drop::drop(&mut bass);Drop::drop(&mut bass);}