diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2013-05-06 00:18:51 +0200 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2013-05-14 16:36:23 +0200 |
| commit | bdc182cc41c2741edc6fdc4ec09b8522479aab40 (patch) | |
| tree | e4d26bbc1b47702ef46cd01bbaa5b5dad8633416 /src/libsyntax/parse/comments.rs | |
| parent | 84745b483f322671f894b9e8d0a462c46275a9d3 (diff) | |
| download | rust-bdc182cc41c2741edc6fdc4ec09b8522479aab40.tar.gz rust-bdc182cc41c2741edc6fdc4ec09b8522479aab40.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index acfd18c74de..8faba022a90 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -111,7 +111,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { return str::connect(lines, ~"\n"); } - fail!(~"not a doc-comment: " + comment); + fail!("not a doc-comment: %s", comment); } fn read_to_eol(rdr: @mut StringReader) -> ~str { |
