Skip to content

Commit cf02560

Browse files
committed
Add comment to AllocatorKind and AllocatorMethod
1 parent 88e9820 commit cf02560

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_ast/src/expand/allocator.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ use rustc_span::{Symbol, sym};
33

44
#[derive(Clone, Debug, Copy, Eq, PartialEq, HashStable_Generic)]
55
pub enum AllocatorKind {
6+
/// Use `#[global_allocator]` as global allocator.
67
Global,
8+
/// Use the default implementation in libstd as global allocator.
79
Default,
810
}
911

@@ -29,6 +31,7 @@ pub enum AllocatorTy {
2931
Usize,
3032
}
3133

34+
/// A method that will be codegened in the allocator shim.
3235
#[derive(Copy, Clone)]
3336
pub struct AllocatorMethod {
3437
pub name: Symbol,

0 commit comments

Comments
 (0)