diff options
Diffstat (limited to 'tests/ui/illegal-ufcs-drop.rs')
-rw-r--r-- | tests/ui/illegal-ufcs-drop.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/illegal-ufcs-drop.rs b/tests/ui/illegal-ufcs-drop.rs new file mode 100644 index 000000000..11411f554 --- /dev/null +++ b/tests/ui/illegal-ufcs-drop.rs @@ -0,0 +1,10 @@ +// run-rustfix +struct Foo; + +impl Drop for Foo { + fn drop(&mut self) {} +} + +fn main() { + Drop::drop(&mut Foo) //~ ERROR explicit use of destructor method +} |