@@ -38,7 +38,7 @@ macro_rules! expand_group {
3838// So you probably just want to nip down to the end.
3939macro_rules! language_item_table {
4040 (
41- $( $variant: ident $( $group: expr) ?, $name: expr, $method: ident, $target: expr; ) *
41+ $( $( # [ attr : meta ] ) * $ variant: ident $( $group: expr) ?, $name: expr, $method: ident, $target: expr; ) *
4242 ) => {
4343
4444 enum_from_u32! {
@@ -47,6 +47,8 @@ macro_rules! language_item_table {
4747 pub enum LangItem {
4848 $(
4949 #[ doc = concat!( "The `" , stringify!( $name) , "` lang item." ) ]
50+ ///
51+ $( #[ attr] ) *
5052 $variant,
5153 ) *
5254 }
@@ -196,15 +198,15 @@ language_item_table! {
196198
197199 Sized , sym:: sized, sized_trait, Target :: Trait ;
198200 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").
200202 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).
202204 StructuralTeq , sym:: structural_teq, structural_teq_trait, Target :: Trait ;
203205 Copy , sym:: copy, copy_trait, Target :: Trait ;
204206 Clone , sym:: clone, clone_trait, Target :: Trait ;
205207 Sync , sym:: sync, sync_trait, Target :: Trait ;
206208 DiscriminantKind , sym:: discriminant_kind, discriminant_kind_trait, Target :: Trait ;
207- // The associated item of `trait DiscriminantKind`.
209+ /// The associated item of the [` DiscriminantKind`] trait .
208210 Discriminant , sym:: discriminant_type, discriminant_type, Target :: AssocTy ;
209211
210212 PointeeTrait , sym:: pointee_trait, pointee_trait, Target :: Trait ;
@@ -279,7 +281,7 @@ language_item_table! {
279281 PanicInfo , sym:: panic_info, panic_info, Target :: Struct ;
280282 PanicLocation , sym:: panic_location, panic_location, Target :: Struct ;
281283 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
283285 BeginPanic , sym:: begin_panic, begin_panic_fn, Target :: Fn ;
284286
285287 ExchangeMalloc , sym:: exchange_malloc, exchange_malloc_fn, Target :: Fn ;
@@ -301,7 +303,7 @@ language_item_table! {
301303
302304 MaybeUninit , sym:: maybe_uninit, maybe_uninit, Target :: Union ;
303305
304- // Align offset for stride != 1; must not panic.
306+ /// Align offset for stride != 1; must not panic.
305307 AlignOffset , sym:: align_offset, align_offset_fn, Target :: Fn ;
306308
307309 Termination , sym:: termination, termination, Target :: Trait ;
0 commit comments