You've already forked comprehensive-rust
							
							
				mirror of
				https://github.com/google/comprehensive-rust.git
				synced 2025-10-31 00:27:50 +02:00 
			
		
		
		
	std::mem::drop is in the prelude (#1027)
				
					
				
			This commit is contained in:
		| @@ -34,7 +34,7 @@ fn main() { | ||||
| Discussion points: | ||||
|  | ||||
| * Why doesn't `Drop::drop` take `self`? | ||||
|     * Short-answer: If it did, `std::mem::drop` would be called at the end of | ||||
|     * Short-answer: If it did, `drop` would be called at the end of | ||||
|         the block, resulting in another call to `Drop::drop`, and a stack | ||||
|         overflow! | ||||
| * Try replacing `drop(a)` with `a.drop()`. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user