Skip to content

Instantly share code, notes, and snippets.

@daboross
Created December 22, 2014 09:52
Show Gist options
  • Save daboross/234656cbf33cd329da2e to your computer and use it in GitHub Desktop.
Save daboross/234656cbf33cd329da2e to your computer and use it in GitHub Desktop.
   Compiling fern v0.1.1-dev (file:///home/daboross/Projects/Rust/fern)
<std macros>:4:24: 4:27 error: mismatched types: expected `api::Logger + Send+Sync`, found `loggers::WriterLogger<std::io::fs::File>` (expected trait api::Logger, found struct loggers::WriterLogger)
<std macros>:4             Ok(val) => val,
                                      ^~~
<std macros>:1:1: 8:2 note: in expansion of try!
/home/daboross/Projects/Rust/fern/src/config.rs:51:21: 51:80 note: expansion site
/home/daboross/Projects/Rust/fern/src/config.rs:51:17: 51:111 error: the trait `core::kinds::Sized` is not implemented for the type `api::Logger + Send+Sync`
/home/daboross/Projects/Rust/fern/src/config.rs:51                 box try!(loggers::WriterLogger::<io::File>::with_file(path)) as Box<api::Logger + Sync + Send>
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/daboross/Projects/Rust/fern/src/config.rs:51:17: 51:111 note: only sized types can be made into objects
/home/daboross/Projects/Rust/fern/src/config.rs:51                 box try!(loggers::WriterLogger::<io::File>::with_file(path)) as Box<api::Logger + Sync + Send>
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/daboross/Projects/Rust/fern/src/config.rs:51:17: 51:111 error: the trait `api::Logger` is not implemented for the type `api::Logger + Send+Sync`
/home/daboross/Projects/Rust/fern/src/config.rs:51                 box try!(loggers::WriterLogger::<io::File>::with_file(path)) as Box<api::Logger + Sync + Send>
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/daboross/Projects/Rust/fern/src/config.rs:51:17: 51:111 note: required for the cast to the object type `api::Logger + Send+Sync`
/home/daboross/Projects/Rust/fern/src/config.rs:51                 box try!(loggers::WriterLogger::<io::File>::with_file(path)) as Box<api::Logger + Sync + Send>
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
Could not compile `fern`.

To learn more, run the command again with --verbose.
// This used to work, doesn't anymore:
box try!(loggers::WriterLogger::<io::File>::with_file(path)) as Box<api::Logger + Sync + Send>
// This still works:
let log = box try!(loggers::WriterLogger::<io::File>::with_file(path))
log as Box<api::Logger + Sync + Send>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment