diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-24 14:50:46 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-24 14:50:46 -0700 |
| commit | a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a (patch) | |
| tree | 3ed0a12ba754e76dc1af00f6a22e34a9cfd1bd88 /src/liblog | |
| parent | 6da0b9dedbc975c3d9ae973216745de9dab535d2 (diff) | |
| parent | 7e3ee02006ec53ff176fc3490ba01eb2a9c823b8 (diff) | |
| download | rust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.tar.gz rust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.zip | |
rollup merge of #23630: nrc/coerce-tidy
See notes on the first commit Closes #18601 r? @nikomatsakis cc @eddyb
Diffstat (limited to 'src/liblog')
| -rw-r--r-- | src/liblog/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index df94a6ac80f..7ccd5401fde 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -304,10 +304,10 @@ pub fn log(level: u32, loc: &'static LogLocation, args: fmt::Arguments) { // Completely remove the local logger from TLS in case anyone attempts to // frob the slot while we're doing the logging. This will destroy any logger // set during logging. - let mut logger = LOCAL_LOGGER.with(|s| { + let mut logger: Box<Logger + Send> = LOCAL_LOGGER.with(|s| { s.borrow_mut().take() }).unwrap_or_else(|| { - box DefaultLogger { handle: io::stderr() } as Box<Logger + Send> + box DefaultLogger { handle: io::stderr() } }); logger.log(&LogRecord { level: LogLevel(level), |
