@@ -492,10 +492,10 @@ pub unsafe trait GlobalAlloc {
492
492
/// library that aborts on memory exhaustion.)
493
493
///
494
494
/// Clients wishing to abort computation in response to an
495
- /// allocation error are encouraged to call the [`oom `] function,
495
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
496
496
/// rather than directly invoking `panic!` or similar.
497
497
///
498
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
498
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
499
499
#[ stable( feature = "global_alloc" , since = "1.28.0" ) ]
500
500
unsafe fn alloc ( & self , layout : Layout ) -> * mut u8 ;
501
501
@@ -529,10 +529,10 @@ pub unsafe trait GlobalAlloc {
529
529
/// just as in `alloc`.
530
530
///
531
531
/// Clients wishing to abort computation in response to an
532
- /// allocation error are encouraged to call the [`oom `] function,
532
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
533
533
/// rather than directly invoking `panic!` or similar.
534
534
///
535
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
535
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
536
536
#[ stable( feature = "global_alloc" , since = "1.28.0" ) ]
537
537
unsafe fn alloc_zeroed ( & self , layout : Layout ) -> * mut u8 {
538
538
let size = layout. size ( ) ;
@@ -589,10 +589,10 @@ pub unsafe trait GlobalAlloc {
589
589
/// library that aborts on memory exhaustion.)
590
590
///
591
591
/// Clients wishing to abort computation in response to a
592
- /// reallocation error are encouraged to call the [`oom `] function,
592
+ /// reallocation error are encouraged to call the [`handle_alloc_error `] function,
593
593
/// rather than directly invoking `panic!` or similar.
594
594
///
595
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
595
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
596
596
#[ stable( feature = "global_alloc" , since = "1.28.0" ) ]
597
597
unsafe fn realloc ( & self , ptr : * mut u8 , layout : Layout , new_size : usize ) -> * mut u8 {
598
598
let new_layout = Layout :: from_size_align_unchecked ( new_size, layout. align ( ) ) ;
@@ -733,10 +733,10 @@ pub unsafe trait Alloc {
733
733
/// library that aborts on memory exhaustion.)
734
734
///
735
735
/// Clients wishing to abort computation in response to an
736
- /// allocation error are encouraged to call the [`oom `] function,
736
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
737
737
/// rather than directly invoking `panic!` or similar.
738
738
///
739
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
739
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
740
740
unsafe fn alloc ( & mut self , layout : Layout ) -> Result < NonNull < u8 > , AllocErr > ;
741
741
742
742
/// Deallocate the memory referenced by `ptr`.
@@ -843,10 +843,10 @@ pub unsafe trait Alloc {
843
843
/// library that aborts on memory exhaustion.)
844
844
///
845
845
/// Clients wishing to abort computation in response to a
846
- /// reallocation error are encouraged to call the [`oom `] function,
846
+ /// reallocation error are encouraged to call the [`handle_alloc_error `] function,
847
847
/// rather than directly invoking `panic!` or similar.
848
848
///
849
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
849
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
850
850
unsafe fn realloc ( & mut self ,
851
851
ptr : NonNull < u8 > ,
852
852
layout : Layout ,
@@ -889,10 +889,10 @@ pub unsafe trait Alloc {
889
889
/// constraints, just as in `alloc`.
890
890
///
891
891
/// Clients wishing to abort computation in response to an
892
- /// allocation error are encouraged to call the [`oom `] function,
892
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
893
893
/// rather than directly invoking `panic!` or similar.
894
894
///
895
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
895
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
896
896
unsafe fn alloc_zeroed ( & mut self , layout : Layout ) -> Result < NonNull < u8 > , AllocErr > {
897
897
let size = layout. size ( ) ;
898
898
let p = self . alloc ( layout) ;
@@ -917,10 +917,10 @@ pub unsafe trait Alloc {
917
917
/// constraints, just as in `alloc`.
918
918
///
919
919
/// Clients wishing to abort computation in response to an
920
- /// allocation error are encouraged to call the [`oom `] function,
920
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
921
921
/// rather than directly invoking `panic!` or similar.
922
922
///
923
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
923
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
924
924
unsafe fn alloc_excess ( & mut self , layout : Layout ) -> Result < Excess , AllocErr > {
925
925
let usable_size = self . usable_size ( & layout) ;
926
926
self . alloc ( layout) . map ( |p| Excess ( p, usable_size. 1 ) )
@@ -941,10 +941,10 @@ pub unsafe trait Alloc {
941
941
/// constraints, just as in `realloc`.
942
942
///
943
943
/// Clients wishing to abort computation in response to a
944
- /// reallocation error are encouraged to call the [`oom `] function,
944
+ /// reallocation error are encouraged to call the [`handle_alloc_error `] function,
945
945
/// rather than directly invoking `panic!` or similar.
946
946
///
947
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
947
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
948
948
unsafe fn realloc_excess ( & mut self ,
949
949
ptr : NonNull < u8 > ,
950
950
layout : Layout ,
@@ -986,7 +986,7 @@ pub unsafe trait Alloc {
986
986
/// unable to assert that the memory block referenced by `ptr`
987
987
/// could fit `layout`.
988
988
///
989
- /// Note that one cannot pass `CannotReallocInPlace` to the `oom `
989
+ /// Note that one cannot pass `CannotReallocInPlace` to the `handle_alloc_error `
990
990
/// function; clients are expected either to be able to recover from
991
991
/// `grow_in_place` failures without aborting, or to fall back on
992
992
/// another reallocation method before resorting to an abort.
@@ -1041,7 +1041,7 @@ pub unsafe trait Alloc {
1041
1041
/// unable to assert that the memory block referenced by `ptr`
1042
1042
/// could fit `layout`.
1043
1043
///
1044
- /// Note that one cannot pass `CannotReallocInPlace` to the `oom `
1044
+ /// Note that one cannot pass `CannotReallocInPlace` to the `handle_alloc_error `
1045
1045
/// function; clients are expected either to be able to recover from
1046
1046
/// `shrink_in_place` failures without aborting, or to fall back
1047
1047
/// on another reallocation method before resorting to an abort.
@@ -1090,10 +1090,10 @@ pub unsafe trait Alloc {
1090
1090
/// will *not* yield undefined behavior.
1091
1091
///
1092
1092
/// Clients wishing to abort computation in response to an
1093
- /// allocation error are encouraged to call the [`oom `] function,
1093
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
1094
1094
/// rather than directly invoking `panic!` or similar.
1095
1095
///
1096
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
1096
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
1097
1097
fn alloc_one < T > ( & mut self ) -> Result < NonNull < T > , AllocErr >
1098
1098
where Self : Sized
1099
1099
{
@@ -1159,10 +1159,10 @@ pub unsafe trait Alloc {
1159
1159
/// Always returns `Err` on arithmetic overflow.
1160
1160
///
1161
1161
/// Clients wishing to abort computation in response to an
1162
- /// allocation error are encouraged to call the [`oom `] function,
1162
+ /// allocation error are encouraged to call the [`handle_alloc_error `] function,
1163
1163
/// rather than directly invoking `panic!` or similar.
1164
1164
///
1165
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
1165
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
1166
1166
fn alloc_array < T > ( & mut self , n : usize ) -> Result < NonNull < T > , AllocErr >
1167
1167
where Self : Sized
1168
1168
{
@@ -1206,10 +1206,10 @@ pub unsafe trait Alloc {
1206
1206
/// Always returns `Err` on arithmetic overflow.
1207
1207
///
1208
1208
/// Clients wishing to abort computation in response to a
1209
- /// reallocation error are encouraged to call the [`oom `] function,
1209
+ /// reallocation error are encouraged to call the [`handle_alloc_error `] function,
1210
1210
/// rather than directly invoking `panic!` or similar.
1211
1211
///
1212
- /// [`oom `]: ../../alloc/alloc/fn.oom .html
1212
+ /// [`handle_alloc_error `]: ../../alloc/alloc/fn.handle_alloc_error .html
1213
1213
unsafe fn realloc_array < T > ( & mut self ,
1214
1214
ptr : NonNull < T > ,
1215
1215
n_old : usize ,
0 commit comments