This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ before_script:
2121script :
2222- cargo build --verbose $FEATURES
2323- cargo test --verbose $FEATURES
24+ - cd test-doc && cargo build
2425
2526after_success :
2627- travis-cargo --only stable doc
Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ macro_rules! error_chain_processed {
166166 quick_error! {
167167 /// The kind of an error
168168 #[ derive( Debug ) ]
169- #[ allow( missing_docs) ]
170169 pub enum $error_kind_name {
171170
171+ /// A convenient variant for String.
172172 Msg ( s: String ) {
173173 description( & s)
174174 display( "{}" , s)
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ pub mod doc {
1212
1313 error_chain ! {
1414 links {
15- inner:: Error , Test ;
15+ inner:: Error , Test , #[ doc = "Doc" ] ;
16+ }
17+ foreign_links {
18+ :: std:: io:: Error , Io , #[ doc = "Io" ] ;
1619 }
1720 errors {
21+ /// Doc
1822 Test2 {
1923
2024 }
Original file line number Diff line number Diff line change @@ -407,3 +407,23 @@ fn without_result() {
407407 }
408408 let _: Result < ( ) , ( ) > = Ok ( ( ) ) ;
409409}
410+
411+ #[ test]
412+ fn documentation ( ) {
413+ mod inner {
414+ error_chain ! { }
415+ }
416+
417+ error_chain ! {
418+ links {
419+ inner:: Error , Inner , #[ doc = "Doc" ] ;
420+ }
421+ foreign_links {
422+ :: std:: io:: Error , Io , #[ doc = "Doc" ] ;
423+ }
424+ errors {
425+ /// Doc
426+ Variant
427+ }
428+ }
429+ }
You can’t perform that action at this time.
0 commit comments