rust-lang-deprecated / error-chain

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

warning: lint unused_doc_comment has been renamed to unused_doc_comments #251

Closed jamesray1 closed 4 years ago

jamesray1 commented 6 years ago

These warnings still occur after adding #[allow(renamed_and_removed_lints)]:

Compiling varint v0.1.0 (file:///home/james/Rust/jrl/varint-rs)
warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = 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)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = 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)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

warning: lint unused_doc_comment has been renamed to unused_doc_comments
  --> varint-rs/src/lib.rs:47:5
   |
47 | /     error_chain! {
48 | |         errors {
49 | |             /// Error for parsing a varint
50 | |             ParseError {
...  |
63 | |         }
64 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
fogti commented 6 years ago

This 'warning' is turned into an error in 'rustc' (with the current error-chain pkg in /src/vendor/error-chain). Thus, some versions of rustc even fail to build, because of this.

orig ref: https://twitter.com/ZschErik/status/1029062002109571073

fogti commented 5 years ago

pingback https://github.com/rust-lang/rust/issues/51650

lucab commented 5 years ago

Can you please double check which error-check versions are in your Cargo.lock?

fogti commented 5 years ago

I currently don't know anymore (I deleted the build 10 days ago), but I think it is in rustc-1.27.1 or 1.28.0 (build via gentoo portage ebuild), possible https://github.com/gentoo/gentoo/blob/master/dev-lang/rust/rust-1.28.0.ebuild. rustc-1.25.0 builds fine.

fogti commented 5 years ago

e.g. error-chain 0.11.0 works with rustc 1.25.0, but error-chain 0.11.0 in rustc 1.27.1-r2 (https://github.com/gentoo/gentoo/blob/master/dev-lang/rust/rust-1.27.1-r2.ebuild) doesn't work anymore.

lucab commented 5 years ago

0.12.0 should be fixing that, then: https://crates.io/crates/error-chain/0.12.0

fogti commented 4 years ago

@jamesray1 This issue can probably be closed.

jamesray1 commented 4 years ago

OK, I have no need for varint ATM so CBB to try and test/reproduce.