rust-lang-deprecated / error-chain

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

warning: lint unused_doc_comment has been renamed to unused_doc_comments #245

Closed df5602 closed 6 years ago

df5602 commented 6 years ago

If you use the error_chain! macro on a recent nightly, a number of warnings are generated:

warning: lint unused_doc_comment has been renamed to unused_doc_comments
 --> src/main.rs:4:1
  |
4 | / error_chain! {
5 | |     foreign_links {
6 | |         IoError(::std::io::Error);
7 | |     }
8 | | }
  | |_^
  |
  = note: #[warn(renamed_and_removed_lints)] on by default
  = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

(Playground)

I think, this is due to #50879.

I'm not sure how to correctly fix this, since just replacing #[allow(unused_doc_comment)] with #[allow(unused_doc_comments)] will not work on older compilers (including current stable).

hoodie commented 6 years ago

how about this #246

jamesray1 commented 6 years ago

+1 https://github.com/Drops-of-Diamond/diamond_drops/issues/86

koutheir commented 6 years ago

@Yamakaky: This issue also happens in Rust stable starting from version 1.27.0. Please release a new version of the error_chain that removes this warning:

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> src/errors.rs:7:1
   |
7  | / error_chain!{
8  | |     errors {
9  | |         ThreadPanic(name: &'static str, panic_parameter: ::std::boxed::Box<::std::any::Any + ::std::marker::Send>) {
10 | |             description("thread panicked"),
...  |
41 | |     }
42 | | }
   | |_^
   |
   = note: #[warn(renamed_and_removed_lints)] on by default
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
Yamakaky commented 6 years ago

Done

dwijnand commented 6 years ago

@Yamakaky the 0.12.0 tag seems to be missing in https://github.com/rust-lang-nursery/error-chain/tags