tailhook/quick-error

no rules expected the token `=>`

C45tr0 opened this issue · 0 comments

New to rust and not sure how to proceed with this.

Running in a docker instance with rust:1.43.1.

Cargo.toml

[package]
name = "test-quick-error"
version = "0.1.0"
license = "MIT"
edition = "2018"

[dependencies]
quick-error = "1.2.3"

src/lib.rs

//! Library to test quick-error

#[macro_use]
extern crate quick_error;

quick_error! {
  /// Error return type.
  #[derive(Debug)]
  pub enum Error {
      /// HTTP client creation failed
      HttpClientError {
          description("HTTP Client creation failed")
      }

      /// Failed to parse final URL.
      UrlError {
          description("Failed to parse final URL")
      }

      /// Failed to make the outgoing request.
      RequestError {
          description("Failed to make the outgoing request")
      }

      /// Failed to perform IO operation
      IoError(std::io::Error) {
          description("Failed to make the outgoing request due to IO error")
      }

      /// Invalid parameter value
      InvalidValue {
          description("Invalid parameter value")
      }
  }
}

Error Message

$cargo build
   Compiling test-quick-error v0.1.0 (/usr/src/myapp)
error: no rules expected the token `=>`
  --> src/lib.rs:7:1
   |
7  | / quick_error! {
8  | |   /// Error return type.
9  | |   #[derive(Debug)]
10 | |   pub enum Error {
...  |
35 | |   }
36 | | }
   | |_^ no rules expected this token in macro call
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `test-quick-error`.

To learn more, run the command again with --verbose.
make: *** [Makefile:2: debug] Error 101