Skip to content

Commit 24e2b8e

Browse files
committed
---
yaml --- r: 147821 b: refs/heads/try2 c: db204b2 h: refs/heads/master i: 147819: 622c311 v: v3
1 parent 6f5cf10 commit 24e2b8e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
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: fe10c63326eee6220900dcbb92197ccf26e2025b
8+
refs/heads/try2: db204b20ab5ed7f27027a95c76c6d6e74eb443d6
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ struct RustcEmitter {
348348

349349
impl diagnostic::Emitter for RustcEmitter {
350350
fn emit(&self,
351-
cmsp: Option<(@codemap::CodeMap, codemap::Span)>,
351+
cmsp: Option<(&codemap::CodeMap, codemap::Span)>,
352352
msg: &str,
353353
lvl: diagnostic::level) {
354354
if lvl == diagnostic::fatal {

branches/try2/src/libsyntax/diagnostic.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static BUG_REPORT_URL: &'static str =
2121

2222
pub trait Emitter {
2323
fn emit(&self,
24-
cmsp: Option<(@codemap::CodeMap, Span)>,
24+
cmsp: Option<(&codemap::CodeMap, Span)>,
2525
msg: &str,
2626
lvl: level);
2727
}
@@ -36,18 +36,18 @@ pub struct SpanHandler {
3636

3737
impl SpanHandler {
3838
pub fn span_fatal(@mut self, sp: Span, msg: &str) -> ! {
39-
self.handler.emit(Some((self.cm, sp)), msg, fatal);
39+
self.handler.emit(Some((&*self.cm, sp)), msg, fatal);
4040
fail!();
4141
}
4242
pub fn span_err(@mut self, sp: Span, msg: &str) {
43-
self.handler.emit(Some((self.cm, sp)), msg, error);
43+
self.handler.emit(Some((&*self.cm, sp)), msg, error);
4444
self.handler.bump_err_count();
4545
}
4646
pub fn span_warn(@mut self, sp: Span, msg: &str) {
47-
self.handler.emit(Some((self.cm, sp)), msg, warning);
47+
self.handler.emit(Some((&*self.cm, sp)), msg, warning);
4848
}
4949
pub fn span_note(@mut self, sp: Span, msg: &str) {
50-
self.handler.emit(Some((self.cm, sp)), msg, note);
50+
self.handler.emit(Some((&*self.cm, sp)), msg, note);
5151
}
5252
pub fn span_bug(@mut self, sp: Span, msg: &str) -> ! {
5353
self.span_fatal(sp, ice_msg(msg));
@@ -111,7 +111,7 @@ impl Handler {
111111
self.bug(~"unimplemented " + msg);
112112
}
113113
pub fn emit(@mut self,
114-
cmsp: Option<(@codemap::CodeMap, Span)>,
114+
cmsp: Option<(&codemap::CodeMap, Span)>,
115115
msg: &str,
116116
lvl: level) {
117117
self.emit.emit(cmsp, msg, lvl);
@@ -227,7 +227,7 @@ pub struct DefaultEmitter;
227227

228228
impl Emitter for DefaultEmitter {
229229
fn emit(&self,
230-
cmsp: Option<(@codemap::CodeMap, Span)>,
230+
cmsp: Option<(&codemap::CodeMap, Span)>,
231231
msg: &str,
232232
lvl: level) {
233233
match cmsp {
@@ -244,20 +244,20 @@ impl Emitter for DefaultEmitter {
244244
}
245245
}
246246

247-
fn highlight_lines(cm: @codemap::CodeMap,
247+
fn highlight_lines(cm: &codemap::CodeMap,
248248
sp: Span,
249249
lvl: level,
250-
lines: @codemap::FileLines) {
250+
lines: &codemap::FileLines) {
251251
let fm = lines.file;
252252
let mut err = io::stderr();
253253
let err = &mut err as &mut io::Writer;
254254

255255
// arbitrarily only print up to six lines of the error
256256
let max_lines = 6u;
257257
let mut elided = false;
258-
let mut display_lines = /* FIXME (#2543) */ lines.lines.clone();
258+
let mut display_lines = lines.lines.as_slice();
259259
if display_lines.len() > max_lines {
260-
display_lines = display_lines.slice(0u, max_lines).to_owned();
260+
display_lines = display_lines.slice(0u, max_lines);
261261
elided = true;
262262
}
263263
// Print the offending lines
@@ -311,7 +311,7 @@ fn highlight_lines(cm: @codemap::CodeMap,
311311
}
312312
}
313313

314-
fn print_macro_backtrace(cm: @codemap::CodeMap, sp: Span) {
314+
fn print_macro_backtrace(cm: &codemap::CodeMap, sp: Span) {
315315
for ei in sp.expn_info.iter() {
316316
let ss = ei.callee.span.as_ref().map_default(~"", |span| cm.span_to_str(*span));
317317
let (pre, post) = match ei.callee.format {

0 commit comments

Comments
 (0)