Skip to content

Commit 8531317

Browse files
committed
---
yaml --- r: 150527 b: refs/heads/try2 c: 46790a7 h: refs/heads/master i: 150525: 0c44f08 150523: c3656df 150519: a0fb1eb 150511: 8fa655a 150495: c989a51 150463: 255f6b2 150399: 2cedc1a 150271: 95c51a8 150015: 21fbe20 149503: 6a254f5 v: v3
1 parent 5f0a1d5 commit 8531317

File tree

2 files changed

+1
-49
lines changed

2 files changed

+1
-49
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 841eb1c56faf033eba03444e208c4d2c5fd34d50
8+
refs/heads/try2: 46790a7d27be661e94716a5ff8f17688f384a9a4
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/util/ppaux.rs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ pub fn note_and_explain_region(cx: &ctxt,
5858
}
5959
}
6060

61-
/// Returns a string like "the block at 27:31" that attempts to explain a
62-
/// lifetime in a way it might plausibly be understood.
63-
pub fn explain_region(cx: &ctxt, region: ty::Region) -> ~str {
64-
let (res, _) = explain_region_and_span(cx, region);
65-
return res;
66-
}
67-
68-
6961
pub fn explain_region_and_span(cx: &ctxt, region: ty::Region)
7062
-> (~str, Option<Span>) {
7163
return match region {
@@ -165,42 +157,6 @@ pub fn bound_region_to_str(cx: &ctxt,
165157
}
166158
}
167159

168-
pub fn ReScope_id_to_str(cx: &ctxt, node_id: ast::NodeId) -> ~str {
169-
match cx.map.find(node_id) {
170-
Some(ast_map::NodeBlock(ref blk)) => {
171-
format!("<block at {}>",
172-
cx.sess.codemap().span_to_str(blk.span))
173-
}
174-
Some(ast_map::NodeExpr(expr)) => {
175-
match expr.node {
176-
ast::ExprCall(..) => {
177-
format!("<call at {}>",
178-
cx.sess.codemap().span_to_str(expr.span))
179-
}
180-
ast::ExprMatch(..) => {
181-
format!("<match at {}>",
182-
cx.sess.codemap().span_to_str(expr.span))
183-
}
184-
ast::ExprAssignOp(..) |
185-
ast::ExprUnary(..) |
186-
ast::ExprBinary(..) |
187-
ast::ExprIndex(..) => {
188-
format!("<method at {}>",
189-
cx.sess.codemap().span_to_str(expr.span))
190-
}
191-
_ => {
192-
format!("<expression at {}>",
193-
cx.sess.codemap().span_to_str(expr.span))
194-
}
195-
}
196-
}
197-
None => {
198-
format!("<unknown-{}>", node_id)
199-
}
200-
_ => cx.sess.bug(format!("ReScope refers to {}", cx.map.node_to_str(node_id)))
201-
}
202-
}
203-
204160
// In general, if you are giving a region error message,
205161
// you should use `explain_region()` or, better yet,
206162
// `note_and_explain_region()`
@@ -280,10 +236,6 @@ pub fn vec_map_to_str<T>(ts: &[T], f: |t: &T| -> ~str) -> ~str {
280236
format!("[{}]", tstrs.connect(", "))
281237
}
282238

283-
pub fn tys_to_str(cx: &ctxt, ts: &[t]) -> ~str {
284-
vec_map_to_str(ts, |t| ty_to_str(cx, *t))
285-
}
286-
287239
pub fn fn_sig_to_str(cx: &ctxt, typ: &ty::FnSig) -> ~str {
288240
format!("fn{}{} -> {}",
289241
typ.binder_id,

0 commit comments

Comments
 (0)