@@ -493,6 +493,7 @@ impl<T> RawTable<T> {
493
493
494
494
/// Erases an element from the table without dropping it.
495
495
#[ cfg_attr( feature = "inline-more" , inline) ]
496
+ #[ deprecated( since = "0.8.1" , note = "use erase or remove instead" ) ]
496
497
pub unsafe fn erase_no_drop ( & mut self , item : & Bucket < T > ) {
497
498
let index = self . bucket_index ( item) ;
498
499
debug_assert ! ( is_full( * self . ctrl( index) ) ) ;
@@ -521,6 +522,7 @@ impl<T> RawTable<T> {
521
522
/// Erases an element from the table, dropping it in place.
522
523
#[ cfg_attr( feature = "inline-more" , inline) ]
523
524
#[ allow( clippy:: needless_pass_by_value) ]
525
+ #[ allow( deprecated) ]
524
526
pub unsafe fn erase ( & mut self , item : Bucket < T > ) {
525
527
// Erase the element from the table first since drop might panic.
526
528
self . erase_no_drop ( & item) ;
@@ -530,6 +532,7 @@ impl<T> RawTable<T> {
530
532
/// Removes an element from the table, returning it.
531
533
#[ cfg_attr( feature = "inline-more" , inline) ]
532
534
#[ allow( clippy:: needless_pass_by_value) ]
535
+ #[ allow( deprecated) ]
533
536
pub unsafe fn remove ( & mut self , item : Bucket < T > ) -> T {
534
537
self . erase_no_drop ( & item) ;
535
538
item. read ( )
0 commit comments