From 0c34cab3db76d100ea7bbe4cd776f27b5f971d2c Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Wed, 1 May 2013 00:53:20 +0900 Subject: [PATCH] Take string slices --- src/librustc/driver/session.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs index ff623049f75..970ee20bfcb 100644 --- a/src/librustc/driver/session.rs +++ b/src/librustc/driver/session.rs @@ -175,16 +175,16 @@ pub struct Session_ { pub type Session = @Session_; pub impl Session_ { - fn span_fatal(@self, sp: span, msg: ~str) -> ! { + fn span_fatal(@self, sp: span, msg: &str) -> ! { self.span_diagnostic.span_fatal(sp, msg) } - fn fatal(@self, msg: ~str) -> ! { + fn fatal(@self, msg: &str) -> ! { self.span_diagnostic.handler().fatal(msg) } - fn span_err(@self, sp: span, msg: ~str) { + fn span_err(@self, sp: span, msg: &str) { self.span_diagnostic.span_err(sp, msg) } - fn err(@self, msg: ~str) { + fn err(@self, msg: &str) { self.span_diagnostic.handler().err(msg) } fn has_errors(@self) -> bool { @@ -193,31 +193,31 @@ pub impl Session_ { fn abort_if_errors(@self) { self.span_diagnostic.handler().abort_if_errors() } - fn span_warn(@self, sp: span, msg: ~str) { + fn span_warn(@self, sp: span, msg: &str) { self.span_diagnostic.span_warn(sp, msg) } - fn warn(@self, msg: ~str) { + fn warn(@self, msg: &str) { self.span_diagnostic.handler().warn(msg) } - fn span_note(@self, sp: span, msg: ~str) { + fn span_note(@self, sp: span, msg: &str) { self.span_diagnostic.span_note(sp, msg) } - fn note(@self, msg: ~str) { + fn note(@self, msg: &str) { self.span_diagnostic.handler().note(msg) } - fn span_bug(@self, sp: span, msg: ~str) -> ! { + fn span_bug(@self, sp: span, msg: &str) -> ! { self.span_diagnostic.span_bug(sp, msg) } - fn bug(@self, msg: ~str) -> ! { + fn bug(@self, msg: &str) -> ! { self.span_diagnostic.handler().bug(msg) } - fn span_unimpl(@self, sp: span, msg: ~str) -> ! { + fn span_unimpl(@self, sp: span, msg: &str) -> ! { self.span_diagnostic.span_unimpl(sp, msg) } - fn unimpl(@self, msg: ~str) -> ! { + fn unimpl(@self, msg: &str) -> ! { self.span_diagnostic.handler().unimpl(msg) } - fn span_lint_level(@self, level: lint::level, sp: span, msg: ~str) { + fn span_lint_level(@self, level: lint::level, sp: span, msg: &str) { match level { lint::allow => { }, lint::warn => self.span_warn(sp, msg), @@ -230,7 +230,7 @@ pub impl Session_ { expr_id: ast::node_id, item_id: ast::node_id, span: span, - msg: ~str) { + msg: &str) { let level = lint::get_lint_settings_level( self.lint_settings, lint_mode, expr_id, item_id); self.span_lint_level(level, span, msg);