File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ use crate::collections::TryReserveErrorKind::*;
17
17
#[ cfg( test) ]
18
18
mod tests;
19
19
20
+ // One central function responsible for reporting capacity overflows. This'll
21
+ // ensure that the code generation related to these panics is minimal as there's
22
+ // only one location which panics rather than a bunch throughout the module.
23
+ #[ cfg( not( no_global_oom_handling) ) ]
24
+ #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
25
+ fn capacity_overflow ( ) -> ! {
26
+ panic ! ( "capacity overflow" ) ;
27
+ }
28
+
20
29
enum AllocInit {
21
30
/// The contents of the new memory are uninitialized.
22
31
Uninitialized ,
@@ -576,12 +585,3 @@ fn alloc_guard(alloc_size: usize) -> Result<(), TryReserveError> {
576
585
Ok ( ( ) )
577
586
}
578
587
}
579
-
580
- // One central function responsible for reporting capacity overflows. This'll
581
- // ensure that the code generation related to these panics is minimal as there's
582
- // only one location which panics rather than a bunch throughout the module.
583
- #[ cfg( not( no_global_oom_handling) ) ]
584
- #[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
585
- fn capacity_overflow ( ) -> ! {
586
- panic ! ( "capacity overflow" ) ;
587
- }
You can’t perform that action at this time.
0 commit comments