- 
                Notifications
    
You must be signed in to change notification settings  - Fork 97
 
Closed
Description
use std::io::Error;
use slog::Logger;
fn repro(log: Logger) {
    let err = Error::other("some error");
    slog::info!(log, "oops"; "err" => #err);
}This compiles successfully on 2.7.0, but fails on 2.8.1 with this error:
    Checking slog-test v0.1.0 (/home/manishearth/sand/crates/slog-test)
error[E0603]: tuple struct constructor `ErrorTagWrapper` is private
    --> /home/manishearth/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/slog-2.8.1/src/lib.rs:920:25
     |
 920 |         let w = $crate::ErrorTagWrapper(v);
     |                         ^^^^^^^^^^^^^^^ private tuple struct constructor
...
3544 | pub struct ErrorTagWrapper<E>(E);
     |                               - a constructor is private if any of the fields is private
     |
    ::: src/lib.rs:6:5
     |
   6 |     slog::info!(log, "oops"; "err" => #err);
     |     --------------------------------------- tuple struct `ErrorTagWrapper` is not publicly re-exported
     |
note: the tuple struct constructor `ErrorTagWrapper` is defined here
    --> /home/manishearth/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/slog-2.8.1/src/lib.rs:3544:1
     |
3544 | pub struct ErrorTagWrapper<E>(E);
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0616]: field `0` of struct `ErrorTagWrapper` is private
 --> src/lib.rs:6:5
  |
6 |     slog::info!(log, "oops"; "err" => #err);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private field
  |
  = note: this error originates in the macro `$crate::__builtin` which comes from the expansion of the macro `slog::info` (in Nightly builds, run with -Z macro-backtrace for more info)
Metadata
Metadata
Assignees
Labels
No labels