Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile on stable rust version #4

Closed
TheAifam5 opened this issue Aug 28, 2019 · 2 comments
Closed

Unable to compile on stable rust version #4

TheAifam5 opened this issue Aug 28, 2019 · 2 comments

Comments

@TheAifam5
Copy link

Environment:
rustup 1.18.3 (2019-05-23)
rustc 1.37.0 (eae3437df 2019-08-13)

Log:

   Compiling slog-journald v2.0.0
error[E0053]: method `emit_unit` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:188:9
    |
188 |         fn $name(&mut self, key: &str) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
195 |     __emitter!(emit_unit = "");
    |     --------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_none` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:188:9
    |
188 |         fn $name(&mut self, key: &str) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
196 |     __emitter!(emit_none = "None");
    |     ------------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_bool` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
198 |     __emitter!(emit_bool: bool);
    |     ---------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, bool) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, bool) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_char` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
199 |     __emitter!(emit_char: char);
    |     ---------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, char) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, char) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_u8` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
200 |     __emitter!(emit_u8: u8);
    |     ------------------------ in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, u8) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, u8) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_i8` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
201 |     __emitter!(emit_i8: i8);
    |     ------------------------ in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, i8) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, i8) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_u16` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
202 |     __emitter!(emit_u16: u16);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, u16) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, u16) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_i16` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
203 |     __emitter!(emit_i16: i16);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, i16) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, i16) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_u32` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
204 |     __emitter!(emit_u32: u32);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, u32) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, u32) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_i32` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
205 |     __emitter!(emit_i32: i32);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, i32) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, i32) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_u64` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
206 |     __emitter!(emit_u64: u64);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, u64) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, u64) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_i64` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
207 |     __emitter!(emit_i64: i64);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, i64) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, i64) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_f32` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
208 |     __emitter!(emit_f32: f32);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, f32) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, f32) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_f64` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
209 |     __emitter!(emit_f64: f64);
    |     -------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, f64) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, f64) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_usize` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
210 |     __emitter!(emit_usize: usize);
    |     ------------------------------ in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, usize) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, usize) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_isize` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
211 |     __emitter!(emit_isize: isize);
    |     ------------------------------ in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, isize) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, isize) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_str` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
212 |     __emitter!(emit_str: &str);
    |     --------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, &str) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, &str) -> std::result::Result<(), slog::Error>`

error[E0053]: method `emit_arguments` has an incompatible type for trait
   --> /home/theaifam5/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-journald-2.0.0/src/lib.rs:183:9
    |
183 |         fn $name(&mut self, key: &str, val: $T) -> slog::Result {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `slog::Key`, found &str
...
213 |     __emitter!(emit_arguments: &std::fmt::Arguments);
    |     ------------------------------------------------- in this macro invocation
    |
    = note: expected type `fn(&mut Serializer, slog::Key, &std::fmt::Arguments<'_>) -> std::result::Result<(), slog::Error>`
               found type `fn(&mut Serializer, &str, &std::fmt::Arguments<'_>) -> std::result::Result<(), slog::Error>`

error: aborting due to 18 previous errors

For more information about this error, try `rustc --explain E0053`.
error: Could not compile `slog-journald`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@tmccombs
Copy link
Collaborator

tmccombs commented Sep 2, 2019

could you provide more information on how you built this. I haven't been able to reproduce.

@TheAifam5
Copy link
Author

That issue is related to this: slog-rs/kvfilter#17
while compiling with dynamic-keys feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants