@@ -366,11 +366,11 @@ pub unsafe trait Allocator {
366366
367367 /// The mode of error handling for types using this allocator.
368368 ///
369- /// [ `Fatal`] means that any allocation failures should be handled
369+ /// `Fatal` means that any allocation failures should be handled
370370 /// globally, often by panicking or aborting. Functions performing
371371 /// allocation will simply return the value or nothing.
372372 ///
373- /// [ `Fallible`] means that any allocation failures should be handled
373+ /// `Fallible` means that any allocation failures should be handled
374374 /// at the point of use. Functions performing allocation will return
375375 /// `Result`.
376376 type ErrorHandling : ErrorHandling ;
@@ -383,19 +383,27 @@ pub mod error_handling_sealed {
383383}
384384use error_handling_sealed:: Sealed ;
385385
386- // FIXME: this trait should be sealed
386+ /// The mode of error handling for types using an allocator.
387+ ///
388+ /// `Fatal` means that any allocation failures should be handled
389+ /// globally, often by panicking or aborting. Functions performing
390+ /// allocation will simply return the value or nothing.
391+ ///
392+ /// `Fallible` means that any allocation failures should be handled
393+ /// at the point of use. Functions performing allocation will return
394+ /// `Result`.
387395#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
388396pub trait ErrorHandling : Sealed {
389397 /// Result type returned by functions that are conditionally fallible.
390398 ///
391- /// - "Infallible" allocators set `type Result<T, E> = T`
392- /// - " Fallible" allocators set `type Result<T, E> = Result<T, E>`
399+ /// - `Fatal` allocators set `type Result<T, E> = T`
400+ /// - ` Fallible` allocators set `type Result<T, E> = Result<T, E>`
393401 type Result < T , E : Error > ;
394402
395403 /// Function to map allocation results into `Self::Result`.
396404 ///
397- /// - For "Infallible" allocators, this should call [`HandleAllocError::handle_alloc_error`]
398- /// - For " Fallible" allocators, this is just the identity function
405+ /// - For `Fatal` allocators, this should unwrap the result
406+ /// - For ` Fallible` allocators, this is just the identity function
399407 #[ must_use]
400408 fn map_result < T , E : Error > ( result : Result < T , E > ) -> Self :: Result < T , E > ;
401409}
0 commit comments