summary refs log tree commit diff
path: root/tests/ui/illegal-ufcs-drop.fixed
blob: 2b1c967ed1e070ca8e775c3ce76e39a64d4fbaf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-rustfix

#![allow(dropping_references)]

struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {}
}

fn main() {
    drop(&mut Foo) //~ ERROR explicit use of destructor method
}