1
Fork 0

rustc: Rename mk_codemap_handler to mk_handler

This commit is contained in:
Brian Anderson 2012-01-13 23:27:28 -08:00
parent 77e95dcf9f
commit 8f57be5bff
5 changed files with 9 additions and 9 deletions

View file

@ -104,7 +104,7 @@ fn load_pkg(filename: str) -> option::t<pkg> {
let sess = @{
cm: cm,
mutable next_id: 0,
diagnostic: diagnostic::mk_codemap_handler(cm, none)
diagnostic: diagnostic::mk_handler(cm, none)
};
let c = parser::parse_crate_from_crate_file(filename, [], sess);

View file

@ -5,7 +5,7 @@ import codemap::span;
export emitter, emit;
export level, fatal, error, warning, note;
export handler, mk_codemap_handler;
export handler, mk_handler;
type emitter = fn@(cmsp: option<(codemap::codemap, span)>,
msg: str, lvl: level);
@ -81,8 +81,8 @@ impl codemap_handler of handler for codemap_t {
fn unimpl(msg: str) -> ! { self.bug("unimplemented " + msg); }
}
fn mk_codemap_handler(cm: codemap::codemap,
emitter: option<emitter>) -> handler {
fn mk_handler(cm: codemap::codemap,
emitter: option<emitter>) -> handler {
let emit = alt emitter {
some(e) { e }

View file

@ -462,7 +462,7 @@ fn build_session(sopts: @session::options, input: str,
sopts.addl_lib_search_paths);
let codemap = codemap::new_codemap();
let diagnostic_handler =
diagnostic::mk_codemap_handler(codemap, some(demitter));
diagnostic::mk_handler(codemap, some(demitter));
@{targ_cfg: target_cfg,
opts: sopts,
cstore: cstore,

View file

@ -262,7 +262,7 @@ fn check_variants_T<T: copy>(
let str3 =
as_str(bind pprust::print_crate(
codemap,
diagnostic::mk_codemap_handler(codemap, none),
diagnostic::mk_handler(codemap, none),
crate2,
filename,
io::string_reader(""), _,
@ -419,7 +419,7 @@ fn parse_and_print(code: str) -> str {
let sess = @{
cm: cm,
mutable next_id: 0,
diagnostic: diagnostic::mk_codemap_handler(cm, none)
diagnostic: diagnostic::mk_handler(cm, none)
};
write_file(filename, code);
let crate = parser::parse_crate_from_source_str(
@ -566,7 +566,7 @@ fn check_variants(files: [str], cx: context) {
let sess = @{
cm: cm,
mutable next_id: 0,
diagnostic: diagnostic::mk_codemap_handler(cm, none)
diagnostic: diagnostic::mk_handler(cm, none)
};
let crate =
parser::parse_crate_from_source_str(

View file

@ -194,7 +194,7 @@ fn main(argv: [str]) {
let sess = @{
cm: cm,
mutable next_id: 0,
diagnostic: diagnostic::mk_codemap_handler(cm, none)
diagnostic: diagnostic::mk_handler(cm, none)
};
let rd = { ps: pprust::rust_printer(w), w: w };
doc_header(rd, argv[1]);