Skip to content

Commit f94844c

Browse files
committed
auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brson
At the same time, this updates the TyVisitor to use a mutable self because it's probably going to be mutating state as it goes along anyway.
2 parents 974f854 + 97f61e7 commit f94844c

File tree

11 files changed

+1717
-503
lines changed

11 files changed

+1717
-503
lines changed

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4572,7 +4572,7 @@ pub fn visitor_object_ty(tcx: ctxt,
45724572
trait_ref.def_id,
45734573
trait_ref.substs.clone(),
45744574
RegionTraitStore(region),
4575-
ast::m_imm,
4575+
ast::m_mutbl,
45764576
EmptyBuiltinBounds())))
45774577
}
45784578

src/libstd/logging.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,10 @@ pub fn console_off() {
4141
#[lang="log_type"]
4242
#[allow(missing_doc)]
4343
pub fn log_type<T>(_level: u32, object: &T) {
44-
use io;
45-
use repr;
46-
use str;
47-
48-
let bytes = do io::with_bytes_writer |writer| {
49-
repr::write_repr(writer, object);
50-
};
44+
use sys;
5145

5246
// XXX: Bad allocation
53-
let msg = str::from_bytes(bytes);
47+
let msg = sys::log_str(object);
5448
newsched_log_str(msg);
5549
}
5650

0 commit comments

Comments
 (0)