Use static string with fail!() and remove fail!(fmt!())

fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
This commit is contained in:
Björn Steinbrink 2013-05-06 00:18:51 +02:00
parent 84745b483f
commit bdc182cc41
177 changed files with 546 additions and 560 deletions

View file

@ -430,8 +430,8 @@ priv impl CodeMap {
}
}
if (a >= len) {
fail!(fmt!("position %u does not resolve to a source location",
pos.to_uint()))
fail!("position %u does not resolve to a source location",
pos.to_uint())
}
return a;