Skip to content

Commit 81d6ab5

Browse files
committed
---
yaml --- r: 119180 b: refs/heads/dist-snap c: 46790a7 h: refs/heads/master v: v3
1 parent 30dddd3 commit 81d6ab5

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
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 841eb1c56faf033eba03444e208c4d2c5fd34d50
9+
refs/heads/dist-snap: 46790a7d27be661e94716a5ff8f17688f384a9a4
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)