mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			256 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			256 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//! 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
 | 
						|
}
 |