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:
parent
84745b483f
commit
bdc182cc41
177 changed files with 546 additions and 560 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue