@@ -42,6 +42,7 @@ pub(super) fn parse_derive(input: TokenStream) -> Result<TokenStream> {
42
42
// * https://github.com/rust-lang/rust/issues/63281
43
43
// * https://github.com/taiki-e/pin-project/pull/53#issuecomment-525906867
44
44
// * https://github.com/taiki-e/pin-project/pull/70
45
+ #[ doc( hidden) ]
45
46
#[ allow( non_upper_case_globals) ]
46
47
const #dummy_const: ( ) = {
47
48
#proj_impl
@@ -66,6 +67,7 @@ pub(super) fn parse_derive(input: TokenStream) -> Result<TokenStream> {
66
67
67
68
let dummy_const = format_ident ! ( "__SCOPE_{}" , ident) ;
68
69
proj_items. extend ( quote ! {
70
+ #[ doc( hidden) ]
69
71
#[ allow( non_upper_case_globals) ]
70
72
const #dummy_const: ( ) = {
71
73
#proj_impl
@@ -379,16 +381,18 @@ impl<'a> Context<'a> {
379
381
} ;
380
382
381
383
let mut proj_items = quote ! {
384
+ #[ doc( hidden) ] // TODO: If the user gave it a name, it should appear in the document.
382
385
#[ allow( clippy:: mut_mut) ] // This lint warns `&mut &mut <ty>`.
383
386
#[ allow( dead_code) ] // This lint warns unused fields/variants.
384
387
#vis struct #proj_ident #proj_generics #where_clause_fields
388
+ #[ doc( hidden) ] // TODO: If the user gave it a name, it should appear in the document.
385
389
#[ allow( dead_code) ] // This lint warns unused fields/variants.
386
390
#vis struct #proj_ref_ident #proj_generics #where_clause_ref_fields
387
391
} ;
388
-
389
392
if self . replace . is_some ( ) {
390
393
// Currently, using quote_spanned here does not seem to have any effect on the diagnostics.
391
394
proj_items. extend ( quote ! {
395
+ #[ doc( hidden) ] // TODO: If the user gave it a name, it should appear in the document.
392
396
#[ allow( dead_code) ] // This lint warns unused fields/variants.
393
397
#vis struct #proj_own_ident #orig_generics #where_clause_own_fields
394
398
} ) ;
@@ -451,20 +455,22 @@ impl<'a> Context<'a> {
451
455
let where_clause = & self . proj . where_clause ;
452
456
453
457
let mut proj_items = quote ! {
458
+ #[ doc( hidden) ] // TODO: If the user gave it a name, it should appear in the document.
454
459
#[ allow( clippy:: mut_mut) ] // This lint warns `&mut &mut <ty>`.
455
460
#[ allow( dead_code) ] // This lint warns unused fields/variants.
456
461
#vis enum #proj_ident #proj_generics #where_clause {
457
462
#proj_variants
458
463
}
464
+ #[ doc( hidden) ] // TODO: If the user gave it a name, it should appear in the document.
459
465
#[ allow( dead_code) ] // This lint warns unused fields/variants.
460
466
#vis enum #proj_ref_ident #proj_generics #where_clause {
461
467
#proj_ref_variants
462
468
}
463
469
} ;
464
-
465
470
if self . replace . is_some ( ) {
466
471
// Currently, using quote_spanned here does not seem to have any effect on the diagnostics.
467
472
proj_items. extend ( quote ! {
473
+ #[ doc( hidden) ] // TODO: If the user gave it a name, it should appear in the document.
468
474
#[ allow( dead_code) ] // This lint warns unused fields/variants.
469
475
#vis enum #proj_own_ident #orig_generics #orig_where_clause {
470
476
#proj_own_variants
0 commit comments