blob: f2f0245df96ffc26221ea72b6e2845ff4744d45b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//! Test error for explicit destructor method calls via UFCS
//@ 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
}
|