Skip to content

Commit c7c18a8

Browse files
committed
---
yaml --- r: 83599 b: refs/heads/try c: a7f19f3 h: refs/heads/master i: 83597: 7c65f15 83595: 49c6ff0 83591: 2bdf4ff 83583: fa2e89f v: v3
1 parent 9a5ebd9 commit c7c18a8

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: 4d47601a7e7324de1dd616a535248d908a1543fe
5+
refs/heads/try: a7f19f36be81cfc04d013fec80598193638fe55b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustdoc/clean.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl Clean<Crate> for visit_ast::RustdocVisitor {
7171
Crate {
7272
name: match maybe_meta {
7373
Some(x) => x.to_owned(),
74-
None => fail!("rustdoc_ng requires a #[link(name=\"foo\")] crate attribute"),
74+
None => fail2!("rustdoc_ng requires a \\#[link(name=\"foo\")] crate attribute"),
7575
},
7676
module: Some(self.module.clean()),
7777
}
@@ -575,9 +575,9 @@ pub enum Type {
575575
impl Clean<Type> for ast::Ty {
576576
fn clean(&self) -> Type {
577577
use syntax::ast::*;
578-
debug!("cleaning type `%?`", self);
578+
debug2!("cleaning type `{:?}`", self);
579579
let codemap = local_data::get(super::ctxtkey, |x| *x.unwrap()).sess.codemap;
580-
debug!("span corresponds to `%s`", codemap.span_to_str(self.span));
580+
debug2!("span corresponds to `{}`", codemap.span_to_str(self.span));
581581
match self.node {
582582
ty_nil => Unit,
583583
ty_ptr(ref m) => RawPointer(m.mutbl.clean(), ~m.ty.clean()),
@@ -595,7 +595,7 @@ impl Clean<Type> for ast::Ty {
595595
ty_closure(ref c) => Closure(~c.clean()),
596596
ty_bare_fn(ref barefn) => BareFunction(~barefn.clean()),
597597
ty_bot => Bottom,
598-
ref x => fail!("Unimplemented type %?", x),
598+
ref x => fail2!("Unimplemented type {:?}", x),
599599
}
600600
}
601601
}
@@ -873,7 +873,7 @@ pub struct Static {
873873

874874
impl Clean<Item> for doctree::Static {
875875
fn clean(&self) -> Item {
876-
debug!("claning static %s: %?", self.name.clean(), self);
876+
debug2!("claning static {}: {:?}", self.name.clean(), self);
877877
Item {
878878
name: Some(self.name.clean()),
879879
attrs: self.attrs.clean(),
@@ -1053,13 +1053,13 @@ trait ToSource {
10531053

10541054
impl ToSource for syntax::codemap::Span {
10551055
fn to_src(&self) -> ~str {
1056-
debug!("converting span %? to snippet", self.clean());
1056+
debug2!("converting span {:?} to snippet", self.clean());
10571057
let cm = local_data::get(super::ctxtkey, |x| x.unwrap().clone()).sess.codemap.clone();
10581058
let sn = match cm.span_to_snippet(*self) {
10591059
Some(x) => x,
10601060
None => ~""
10611061
};
1062-
debug!("got snippet %s", sn);
1062+
debug2!("got snippet {}", sn);
10631063
sn
10641064
}
10651065
}
@@ -1084,17 +1084,17 @@ fn name_from_pat(p: &ast::Pat) -> ~str {
10841084
PatWild => ~"_",
10851085
PatIdent(_, ref p, _) => path_to_str(p),
10861086
PatEnum(ref p, _) => path_to_str(p),
1087-
PatStruct(*) => fail!("tried to get argument name from pat_struct, \
1087+
PatStruct(*) => fail2!("tried to get argument name from pat_struct, \
10881088
which is not allowed in function arguments"),
10891089
PatTup(*) => ~"(tuple arg NYI)",
10901090
PatBox(p) => name_from_pat(p),
10911091
PatUniq(p) => name_from_pat(p),
10921092
PatRegion(p) => name_from_pat(p),
1093-
PatLit(*) => fail!("tried to get argument name from pat_lit, \
1093+
PatLit(*) => fail2!("tried to get argument name from pat_lit, \
10941094
which is not allowed in function arguments"),
1095-
PatRange(*) => fail!("tried to get argument name from pat_range, \
1095+
PatRange(*) => fail2!("tried to get argument name from pat_range, \
10961096
which is not allowed in function arguments"),
1097-
PatVec(*) => fail!("tried to get argument name from pat_vec, \
1097+
PatVec(*) => fail2!("tried to get argument name from pat_vec, \
10981098
which is not allowed in function arguments")
10991099
}
11001100
}
@@ -1117,14 +1117,14 @@ fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
11171117
use syntax::ast::*;
11181118

11191119
let dm = local_data::get(super::ctxtkey, |x| *x.unwrap()).tycx.def_map;
1120-
debug!("searching for %? in defmap", id);
1120+
debug2!("searching for {:?} in defmap", id);
11211121
let d = match dm.find(&id) {
11221122
Some(k) => k,
11231123
None => {
11241124
let ctxt = local_data::get(super::ctxtkey, |x| *x.unwrap());
1125-
debug!("could not find %? in defmap (`%s`)", id,
1125+
debug2!("could not find {:?} in defmap (`{}`)", id,
11261126
syntax::ast_map::node_id_to_str(ctxt.tycx.items, id, ctxt.sess.intr()));
1127-
fail!("Unexpected failure: unresolved id not in defmap (this is a bug!)")
1127+
fail2!("Unexpected failure: unresolved id not in defmap (this is a bug!)")
11281128
}
11291129
};
11301130

@@ -1133,7 +1133,7 @@ fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
11331133
DefSelf(i) | DefSelfTy(i) => return Self(i),
11341134
DefTy(i) => i,
11351135
DefTrait(i) => {
1136-
debug!("saw DefTrait in def_to_id");
1136+
debug2!("saw DefTrait in def_to_id");
11371137
i
11381138
},
11391139
DefPrimTy(p) => match p {
@@ -1144,10 +1144,10 @@ fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
11441144
DefTyParam(i, _) => return Generic(i.node),
11451145
DefStruct(i) => i,
11461146
DefTyParamBinder(i) => {
1147-
debug!("found a typaram_binder, what is it? %d", i);
1147+
debug2!("found a typaram_binder, what is it? {}", i);
11481148
return TyParamBinder(i);
11491149
},
1150-
x => fail!("resolved type maps to a weird def %?", x),
1150+
x => fail2!("resolved type maps to a weird def {:?}", x),
11511151
};
11521152
ResolvedPath{ path: path, typarams: tpbs, did: def_id }
11531153
}

branches/try/src/librustdoc/core.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ fn get_ast_and_resolve(cpath: &Path, libs: ~[Path]) -> DocContext {
6262
crate = phase_2_configure_and_expand(sess, cfg, crate);
6363
let analysis = phase_3_run_analysis_passes(sess, &crate);
6464

65-
debug!("crate: %?", crate);
65+
debug2!("crate: {:?}", crate);
6666
DocContext { crate: crate, tycx: analysis.ty_cx, sess: sess }
6767
}
6868

6969
pub fn run_core (libs: ~[Path], path: &Path) -> clean::Crate {
7070
let ctxt = @get_ast_and_resolve(path, libs);
71-
debug!("defmap:");
71+
debug2!("defmap:");
7272
for (k, v) in ctxt.tycx.def_map.iter() {
73-
debug!("%?: %?", k, v);
73+
debug2!("{:?}: {:?}", k, v);
7474
}
7575
local_data::set(super::ctxtkey, ctxt);
7676

branches/try/src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fn mkdir(path: &Path) {
205205
do io::io_error::cond.trap(|err| {
206206
error2!("Couldn't create directory `{}`: {}",
207207
path.to_str(), err.desc);
208-
fail!()
208+
fail2!()
209209
}).inside {
210210
if !path.is_dir() {
211211
file::mkdir(path);

branches/try/src/librustdoc/passes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn strip_hidden(crate: clean::Crate) -> plugins::PluginResult {
3232
for innerattr in l.iter() {
3333
match innerattr {
3434
&clean::Word(ref s) if "hidden" == *s => {
35-
debug!("found one in strip_hidden; removing");
35+
debug2!("found one in strip_hidden; removing");
3636
return None;
3737
},
3838
_ => (),

branches/try/src/librustdoc/rustdoc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ fn jsonify(crate: clean::Crate, res: ~[plugins::PluginJson], dst: Path) {
238238
};
239239
let crate_json = match extra::json::from_str(crate_json_str) {
240240
Ok(j) => j,
241-
Err(_) => fail!("Rust generated JSON is invalid??")
241+
Err(_) => fail2!("Rust generated JSON is invalid??")
242242
};
243243

244244
json.insert(~"crate", crate_json);

branches/try/src/librustdoc/visit_ast.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl RustdocVisitor {
3737
self.attrs = crate.attrs.clone();
3838
fn visit_struct_def(item: &ast::item, sd: @ast::struct_def, generics:
3939
&ast::Generics) -> Struct {
40-
debug!("Visiting struct");
40+
debug2!("Visiting struct");
4141
let struct_type = struct_type_from_def(sd);
4242
Struct {
4343
id: item.id,
@@ -52,7 +52,7 @@ impl RustdocVisitor {
5252
}
5353

5454
fn visit_enum_def(it: &ast::item, def: &ast::enum_def, params: &ast::Generics) -> Enum {
55-
debug!("Visiting enum");
55+
debug2!("Visiting enum");
5656
let mut vars: ~[Variant] = ~[];
5757
for x in def.variants.iter() {
5858
vars.push(Variant {
@@ -77,7 +77,7 @@ impl RustdocVisitor {
7777

7878
fn visit_fn(item: &ast::item, fd: &ast::fn_decl, purity: &ast::purity,
7979
_abi: &AbiSet, gen: &ast::Generics) -> Function {
80-
debug!("Visiting fn");
80+
debug2!("Visiting fn");
8181
Function {
8282
id: item.id,
8383
vis: item.vis,
@@ -96,7 +96,7 @@ impl RustdocVisitor {
9696
let name = match am.find(&id) {
9797
Some(m) => match m {
9898
&ast_map::node_item(ref it, _) => Some(it.ident),
99-
_ => fail!("mod id mapped to non-item in the ast map")
99+
_ => fail2!("mod id mapped to non-item in the ast map")
100100
},
101101
None => None
102102
};
@@ -113,7 +113,7 @@ impl RustdocVisitor {
113113
}
114114

115115
fn visit_item(item: &ast::item, om: &mut Module) {
116-
debug!("Visiting item %?", item);
116+
debug2!("Visiting item {:?}", item);
117117
match item.node {
118118
ast::item_mod(ref m) => {
119119
om.mods.push(visit_mod_contents(item.span, item.attrs.clone(),

0 commit comments

Comments
 (0)