File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
8
8
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
9
9
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
10
10
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11
- refs/heads/auto: 505cd8a3cc9ddc89ff766a07cc90797421296d34
11
+ refs/heads/auto: abad7d6bba9d3fa9d5f1126c8ef6f1b413db1152
12
12
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
13
13
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
14
14
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ extern "rust-intrinsic" {
190
190
/// Drop glue is not run on the destination.
191
191
pub fn move_val_init < T > ( dst : * mut T , src : T ) ;
192
192
193
- // SNAP ba0e1cd
193
+ // SNAP d4432b3
194
194
#[ cfg( stage0) ]
195
195
/// Moves a value to an uninitialized memory location.
196
196
///
Original file line number Diff line number Diff line change @@ -2638,7 +2638,7 @@ impl<'a> Parser<'a> {
2638
2638
// ... but for now: check for a place: `box(PLACE) EXPR`.
2639
2639
2640
2640
if try!( self . eat ( & token:: OpenDelim ( token:: Paren ) ) ) {
2641
- // SNAP ba0e1cd
2641
+ // SNAP d4432b3
2642
2642
// Enable this warning after snapshot ...
2643
2643
//
2644
2644
// let box_span = mk_sp(lo, self.last_span.hi);
@@ -2659,9 +2659,15 @@ impl<'a> Parser<'a> {
2659
2659
self . span_err ( span,
2660
2660
& format ! ( "expected expression, found `{}`" ,
2661
2661
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
+
2662
2667
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 ()" ) ) ;
2665
2671
self . abort_if_errors ( ) ;
2666
2672
}
2667
2673
let subexpression = try!( self . parse_prefix_expr ( ) ) ;
You can’t perform that action at this time.
0 commit comments