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);}
The text was updated successfully, but these errors were encountered:
detect UFCS drop and allow UFCS methods to have explicit type parameters.
Work towards rust-lang#18875.
Since code could previously call the methods & implement the traits
manually, this is a
[breaking-change]
Closesrust-lang#19586. Closesrust-lang#19375.
detect UFCS drop and allow UFCS methods to have explicit type parameters.
Work towards rust-lang#18875.
Since code could previously call the methods & implement the traits
manually, this is a
[breaking-change]
Closesrust-lang#19586. Closesrust-lang#19375.
foo.drop()
currently errors withexplicit call to destructor
, which is good, but the error does not fire for UFCS-styleDrop::drop(&mut foo)
calls, leading to the ability to call a value’s destructor more than once:The text was updated successfully, but these errors were encountered: