Drop a reference does nothing
https://doc.rust-lang.org/std/mem/fn.drop.html > This function is not magic; it is literally defined as > pub fn drop<T>(_x: T) { } > Because _x is moved into the function, it is automatically dropped before the function returns. warning: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. --> tests/test_class.rs:471:9 | 471 | drop(inst); | ^^^^^^^^^^ | = note: #[warn(drop_ref)] on by default note: argument has type &GCIntegration --> tests/test_class.rs:471:14 | 471 | drop(inst); | ^^^^ = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#drop_ref
This commit is contained in:
parent
39a78aa407
commit
512bd6a332
|
@ -468,7 +468,6 @@ fn gc_integration() {
|
|||
token: t}).unwrap();
|
||||
|
||||
*inst.self_ref.borrow_mut() = inst.into();
|
||||
drop(inst);
|
||||
}
|
||||
|
||||
let gil = Python::acquire_gil();
|
||||
|
|
Loading…
Reference in New Issue