Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
drop
/
explicit-drop-call-error.rs
blob: e41c806bd1e0db46adbba851434374640ef80ee2 [
file
] [
log
] [
blame
]
//! 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
::
drop
(&
mut
Foo
)
//~ ERROR explicit use of destructor method
}