1
1
//! The point of this crate is to be able to have enough different "kinds" of
2
2
//! documentation generated so we can test each different features.
3
- #![ doc( html_playground_url="https://play.rust-lang.org/" ) ]
4
-
3
+ #![ doc( html_playground_url = "https://play.rust-lang.org/" ) ]
5
4
#![ crate_name = "test_docs" ]
6
5
#![ allow( internal_features) ]
7
6
#![ feature( rustdoc_internals) ]
@@ -343,18 +342,17 @@ pub trait EmptyTrait1 {}
343
342
pub trait EmptyTrait2 { }
344
343
pub trait EmptyTrait3 { }
345
344
346
- pub struct HasEmptyTraits { }
345
+ pub struct HasEmptyTraits { }
347
346
348
347
impl EmptyTrait1 for HasEmptyTraits { }
349
348
impl EmptyTrait2 for HasEmptyTraits { }
350
349
#[ doc( cfg( feature = "some-feature" ) ) ]
351
350
impl EmptyTrait3 for HasEmptyTraits { }
352
351
353
352
mod macros;
354
- pub use macros:: * ;
355
-
356
353
#[ doc( alias = "AliasForTheStdReexport" ) ]
357
354
pub use :: std as TheStdReexport ;
355
+ pub use macros:: * ;
358
356
359
357
pub mod details {
360
358
/// We check the appearance of the `<details>`/`<summary>` in here.
@@ -406,19 +404,22 @@ pub mod doc_block_table {
406
404
println ! ( ) ;
407
405
}
408
406
}
409
-
410
407
}
411
408
412
409
pub struct NotableStructWithLongName < R > ( R ) ;
413
410
414
411
impl < R : std:: io:: Read > NotableStructWithLongName < R > {
415
- pub fn create_an_iterator_from_read ( r : R ) -> NotableStructWithLongName < R > { Self ( r) }
412
+ pub fn create_an_iterator_from_read ( r : R ) -> NotableStructWithLongName < R > {
413
+ Self ( r)
414
+ }
416
415
}
417
416
418
417
impl < R : std:: io:: Read > std:: iter:: Iterator for NotableStructWithLongName < R > {
419
418
type Item = ( ) ;
420
419
421
- fn next ( & mut self ) -> Option < Self :: Item > { ( ) }
420
+ fn next ( & mut self ) -> Option < Self :: Item > {
421
+ ( )
422
+ }
422
423
}
423
424
424
425
pub trait TraitWithNoDocblocks {
@@ -527,7 +528,6 @@ pub mod search_results {
527
528
macro_rules! foo {
528
529
( ) => { } ;
529
530
}
530
-
531
531
}
532
532
533
533
pub mod fields {
@@ -540,14 +540,8 @@ pub mod fields {
540
540
pub b : u32 ,
541
541
}
542
542
pub enum Enum {
543
- A {
544
- a : u8 ,
545
- b : u32 ,
546
- } ,
547
- B {
548
- a : u8 ,
549
- b : u32 ,
550
- } ,
543
+ A { a : u8 , b : u32 } ,
544
+ B { a : u8 , b : u32 } ,
551
545
}
552
546
}
553
547
@@ -713,3 +707,21 @@ pub trait ItemsTrait {
713
707
/// blablala
714
708
fn bar ( ) ;
715
709
}
710
+
711
+ pub mod SidebarSort {
712
+ use std:: cell:: Cell ;
713
+ use std:: sync:: atomic:: * ;
714
+ pub trait SidebarFoo { }
715
+
716
+ impl SidebarFoo for u32 { }
717
+ impl SidebarFoo for u8 { }
718
+ impl SidebarFoo for u16 { }
719
+ impl SidebarFoo for usize { }
720
+ impl SidebarFoo for AtomicU32 { }
721
+ impl SidebarFoo for AtomicU16 { }
722
+ impl SidebarFoo for AtomicU8 { }
723
+ impl SidebarFoo for AtomicBool { }
724
+ impl SidebarFoo for Cell < u16 > { }
725
+ impl SidebarFoo for Cell < u8 > { }
726
+ impl < ' a > SidebarFoo for & ' a str { }
727
+ }
0 commit comments