@@ -38,7 +38,7 @@ macro_rules! expand_group {
38
38
// So you probably just want to nip down to the end.
39
39
macro_rules! language_item_table {
40
40
(
41
- $( $variant: ident $( $group: expr) ?, $name: expr, $method: ident, $target: expr; ) *
41
+ $( $( # [ attr : meta ] ) * $ variant: ident $( $group: expr) ?, $name: expr, $method: ident, $target: expr; ) *
42
42
) => {
43
43
44
44
enum_from_u32! {
@@ -47,6 +47,8 @@ macro_rules! language_item_table {
47
47
pub enum LangItem {
48
48
$(
49
49
#[ doc = concat!( "The `" , stringify!( $name) , "` lang item." ) ]
50
+ ///
51
+ $( #[ attr] ) *
50
52
$variant,
51
53
) *
52
54
}
@@ -196,15 +198,15 @@ language_item_table! {
196
198
197
199
Sized , sym:: sized, sized_trait, Target :: Trait ;
198
200
Unsize , sym:: unsize, unsize_trait, Target :: Trait ;
199
- // Trait injected by #[derive(PartialEq)], (i.e. "Partial EQ").
201
+ /// Trait injected by ` #[derive(PartialEq)]` , (i.e. "Partial EQ").
200
202
StructuralPeq , sym:: structural_peq, structural_peq_trait, Target :: Trait ;
201
- // Trait injected by #[derive(Eq)], (i.e. "Total EQ"; no, I will not apologize).
203
+ /// Trait injected by ` #[derive(Eq)]` , (i.e. "Total EQ"; no, I will not apologize).
202
204
StructuralTeq , sym:: structural_teq, structural_teq_trait, Target :: Trait ;
203
205
Copy , sym:: copy, copy_trait, Target :: Trait ;
204
206
Clone , sym:: clone, clone_trait, Target :: Trait ;
205
207
Sync , sym:: sync, sync_trait, Target :: Trait ;
206
208
DiscriminantKind , sym:: discriminant_kind, discriminant_kind_trait, Target :: Trait ;
207
- // The associated item of `trait DiscriminantKind`.
209
+ /// The associated item of the [` DiscriminantKind`] trait .
208
210
Discriminant , sym:: discriminant_type, discriminant_type, Target :: AssocTy ;
209
211
210
212
PointeeTrait , sym:: pointee_trait, pointee_trait, Target :: Trait ;
@@ -279,7 +281,7 @@ language_item_table! {
279
281
PanicInfo , sym:: panic_info, panic_info, Target :: Struct ;
280
282
PanicLocation , sym:: panic_location, panic_location, Target :: Struct ;
281
283
PanicImpl , sym:: panic_impl, panic_impl, Target :: Fn ;
282
- // libstd panic entry point. Necessary for const eval to be able to catch it
284
+ /// libstd panic entry point. Necessary for const eval to be able to catch it
283
285
BeginPanic , sym:: begin_panic, begin_panic_fn, Target :: Fn ;
284
286
285
287
ExchangeMalloc , sym:: exchange_malloc, exchange_malloc_fn, Target :: Fn ;
@@ -301,7 +303,7 @@ language_item_table! {
301
303
302
304
MaybeUninit , sym:: maybe_uninit, maybe_uninit, Target :: Union ;
303
305
304
- // Align offset for stride != 1; must not panic.
306
+ /// Align offset for stride != 1; must not panic.
305
307
AlignOffset , sym:: align_offset, align_offset_fn, Target :: Fn ;
306
308
307
309
Termination , sym:: termination, termination, Target :: Trait ;
0 commit comments