Skip to content

Commit c339c94

Browse files
committed
---
yaml --- r: 221053 b: refs/heads/auto c: abad7d6 h: refs/heads/master i: 221051: 0c01187 v: v3
1 parent d302394 commit c339c94

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 505cd8a3cc9ddc89ff766a07cc90797421296d34
11+
refs/heads/auto: abad7d6bba9d3fa9d5f1126c8ef6f1b413db1152
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ extern "rust-intrinsic" {
190190
/// Drop glue is not run on the destination.
191191
pub fn move_val_init<T>(dst: *mut T, src: T);
192192

193-
// SNAP ba0e1cd
193+
// SNAP d4432b3
194194
#[cfg(stage0)]
195195
/// Moves a value to an uninitialized memory location.
196196
///

branches/auto/src/libsyntax/parse/parser.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2638,7 +2638,7 @@ impl<'a> Parser<'a> {
26382638
// ... but for now: check for a place: `box(PLACE) EXPR`.
26392639

26402640
if try!(self.eat(&token::OpenDelim(token::Paren)) ){
2641-
// SNAP ba0e1cd
2641+
// SNAP d4432b3
26422642
// Enable this warning after snapshot ...
26432643
//
26442644
// let box_span = mk_sp(lo, self.last_span.hi);
@@ -2659,9 +2659,15 @@ impl<'a> Parser<'a> {
26592659
self.span_err(span,
26602660
&format!("expected expression, found `{}`",
26612661
this_token_to_string));
2662+
2663+
// Spanning just keyword avoids constructing
2664+
// printout of arg expression (which starts
2665+
// with parenthesis, as established above).
2666+
26622667
let box_span = mk_sp(lo, keyword_hi);
2663-
let new_expr = format!("box () {}", pprust::expr_to_string(&place));
2664-
self.span_suggestion(box_span, "try using `box ()` instead:", new_expr);
2668+
self.span_suggestion(box_span,
2669+
"try using `box ()` instead:",
2670+
format!("box ()"));
26652671
self.abort_if_errors();
26662672
}
26672673
let subexpression = try!(self.parse_prefix_expr());

0 commit comments

Comments
 (0)