mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Take string slices
This commit is contained in:
parent
941154721e
commit
0c34cab3db
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user