Skip to content

Commit 3dca388

Browse files
committed
---
yaml --- r: 224159 b: refs/heads/beta c: abad7d6 h: refs/heads/master i: 224157: 5230cb9 224155: 9af4770 224151: 0b1c666 224143: 48134a4 224127: 8670ed6 v: v3
1 parent 4d8636a commit 3dca388

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 505cd8a3cc9ddc89ff766a07cc90797421296d34
26+
refs/heads/beta: abad7d6bba9d3fa9d5f1126c8ef6f1b413db1152
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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/beta/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)