rust-lang-deprecated / error-chain

Error boilerplate for Rust
Apache License 2.0
729 stars 111 forks source link

clippy errors about unused documentation #213

Closed vitiral closed 7 years ago

vitiral commented 7 years ago

I'm getting kind of strange errors when building (not just for clippy like I had though initially)

warning: doc comment not used by rustdoc            
   --> src/types.rs:21:1                            
    |                                               
21  | / error_chain! {                              
22  | |     types {                                 
23  | |         Error, ErrorKind, ResultExt, Result;
24  | |     }                                       
...   |                                             
125 | |     }                                       
126 | | }                                           
    | |_^                                           
    |                                               
    = note: #[warn(unused_doc_comment)] on by default                                                    
    = note: this error originates in a macro outside of the current crate                                

Since this library is so widely used I thought you would appreciate the heads up.

This is happening in this commit with

$ rustc --version --verbose                                               
rustc 1.21.0-nightly (7eeac1b81 2017-08-30)         
binary: rustc             
commit-hash: 7eeac1b81446c6327f1827ef334eca2db7fe28f7                                                    
commit-date: 2017-08-30   
host: x86_64-unknown-linux-gnu                      
release: 1.21.0-nightly   
LLVM version: 4.0 
Yamakaky commented 7 years ago

Hum, it should not do that. Do you want to try a PR?

vitiral commented 7 years ago

I switched to using the master branch and it fixed itself. It looks like this issue will be fixed in the next release.

Heads up, I noticed the display() method for derived errors was removed in the master branch. Not sure if that was intentional or not.