Skip to content

Commit 7803897

Browse files
committed
---
yaml --- r: 151775 b: refs/heads/try2 c: 67e39a8 h: refs/heads/master i: 151773: 0b6d631 151771: 4727af5 151767: ad7e6a8 151759: aef3e2e 151743: 9162b62 v: v3
1 parent 8e930e3 commit 7803897

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ce11f19695f0615bdb9de3702519920584c6102d
8+
refs/heads/try2: 67e39a8e7686bd33b9a8fbfc926f619029a33ac0
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libfmt_macros/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub struct Parser<'a> {
203203
cur: str::CharOffsets<'a>,
204204
depth: uint,
205205
/// Error messages accumulated during parsing
206-
pub errors: Vec<~str>,
206+
pub errors: Vec<StrBuf>,
207207
}
208208

209209
impl<'a> Iterator<Piece<'a>> for Parser<'a> {
@@ -246,10 +246,10 @@ impl<'a> Parser<'a> {
246246
}
247247

248248
/// Notifies of an error. The message doesn't actually need to be of type
249-
/// ~str, but I think it does when this eventually uses conditions so it
249+
/// StrBuf, but I think it does when this eventually uses conditions so it
250250
/// might as well start using it now.
251251
fn err(&mut self, msg: &str) {
252-
self.errors.push(msg.to_owned());
252+
self.errors.push(msg.to_strbuf());
253253
}
254254

255255
/// Optionally consumes the specified character. If the character is not at

branches/try2/src/libsyntax/ext/format.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,9 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt, sp: Span,
886886
}
887887
match parser.errors.shift() {
888888
Some(error) => {
889-
cx.ecx.span_err(efmt.span, "invalid format string: " + error);
889+
cx.ecx.span_err(efmt.span,
890+
format_strbuf!("invalid format string: {}",
891+
error).as_slice());
890892
return DummyResult::raw_expr(sp);
891893
}
892894
None => {}

0 commit comments

Comments
 (0)