@@ -656,6 +656,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
656656 #[ inline]
657657 #[ must_use]
658658 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
659+ #[ rustc_confusables( "length" , "size" ) ]
659660 pub fn len ( & self ) -> usize {
660661 self . len
661662 }
@@ -740,6 +741,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
740741 #[ inline]
741742 #[ must_use]
742743 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
744+ #[ rustc_confusables( "first" ) ]
743745 pub fn front ( & self ) -> Option < & T > {
744746 unsafe { self . head . as_ref ( ) . map ( |node| & node. as_ref ( ) . element ) }
745747 }
@@ -890,6 +892,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
890892 /// assert_eq!(3, *d.back().unwrap());
891893 /// ```
892894 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
895+ #[ rustc_confusables( "push" , "append" ) ]
893896 pub fn push_back ( & mut self , elt : T ) {
894897 let node = Box :: new_in ( Node :: new ( elt) , & self . alloc ) ;
895898 let node_ptr = NonNull :: from ( Box :: leak ( node) ) ;
@@ -1004,6 +1007,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
10041007 /// assert_eq!(d.remove(0), 1);
10051008 /// ```
10061009 #[ unstable( feature = "linked_list_remove" , issue = "69210" ) ]
1010+ #[ rustc_confusables( "delete" , "take" ) ]
10071011 pub fn remove ( & mut self , at : usize ) -> T {
10081012 let len = self . len ( ) ;
10091013 assert ! ( at < len, "Cannot remove at an index outside of the list bounds" ) ;
@@ -1478,6 +1482,7 @@ impl<'a, T, A: Allocator> Cursor<'a, T, A> {
14781482 /// or None if the list is empty.
14791483 #[ must_use]
14801484 #[ unstable( feature = "linked_list_cursors" , issue = "58533" ) ]
1485+ #[ rustc_confusables( "first" ) ]
14811486 pub fn front ( & self ) -> Option < & ' a T > {
14821487 self . list . front ( )
14831488 }
@@ -1486,6 +1491,7 @@ impl<'a, T, A: Allocator> Cursor<'a, T, A> {
14861491 /// or None if the list is empty.
14871492 #[ must_use]
14881493 #[ unstable( feature = "linked_list_cursors" , issue = "58533" ) ]
1494+ #[ rustc_confusables( "last" ) ]
14891495 pub fn back ( & self ) -> Option < & ' a T > {
14901496 self . list . back ( )
14911497 }
@@ -1788,6 +1794,7 @@ impl<'a, T, A: Allocator> CursorMut<'a, T, A> {
17881794 ///
17891795 /// This operation should compute in *O*(1) time.
17901796 #[ unstable( feature = "linked_list_cursors" , issue = "58533" ) ]
1797+ #[ rustc_confusables( "push" , "append" ) ]
17911798 pub fn push_back ( & mut self , elt : T ) {
17921799 // Safety: We know that `push_back` does not change the position in
17931800 // memory of other nodes. This ensures that `self.current` remains
@@ -1834,6 +1841,7 @@ impl<'a, T, A: Allocator> CursorMut<'a, T, A> {
18341841 ///
18351842 /// This operation should compute in *O*(1) time.
18361843 #[ unstable( feature = "linked_list_cursors" , issue = "58533" ) ]
1844+ #[ rustc_confusables( "pop" ) ]
18371845 pub fn pop_back ( & mut self ) -> Option < T > {
18381846 if self . list . is_empty ( ) {
18391847 None
@@ -1854,6 +1862,7 @@ impl<'a, T, A: Allocator> CursorMut<'a, T, A> {
18541862 /// or None if the list is empty.
18551863 #[ must_use]
18561864 #[ unstable( feature = "linked_list_cursors" , issue = "58533" ) ]
1865+ #[ rustc_confusables( "first" ) ]
18571866 pub fn front ( & self ) -> Option < & T > {
18581867 self . list . front ( )
18591868 }
@@ -1870,6 +1879,7 @@ impl<'a, T, A: Allocator> CursorMut<'a, T, A> {
18701879 /// or None if the list is empty.
18711880 #[ must_use]
18721881 #[ unstable( feature = "linked_list_cursors" , issue = "58533" ) ]
1882+ #[ rustc_confusables( "last" ) ]
18731883 pub fn back ( & self ) -> Option < & T > {
18741884 self . list . back ( )
18751885 }
0 commit comments