File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ fn main() {
23
23
loop { break ; }
24
24
' l: loop { break ' l 1 ; }
25
25
match x { _ => ( ) }
26
- let x = move |a, b, c| { a + b + c } ;
26
+ let x = move |a, b, c| { a + b + c } ;
27
+ let f = |_||x, y| x+y;
27
28
let x = { 1 } ;
28
29
let x = unsafe { 1 } ;
29
30
a = 1 ;
Original file line number Diff line number Diff line change @@ -348,6 +348,16 @@ gt :: { () }
348
348
_ -> pushToken (Spanned tok s)
349
349
}
350
350
351
+ -- This should precede any ' |' token which could be absorbed in a ' ||' token. This works in the same
352
+ -- way as ' gt' .
353
+ pipe :: { () }
354
+ : {- empty -} {%% \(Spanned tok s) ->
355
+ let s' = nudge 1 0 s; s' ' = nudge 0 (-1) s
356
+ in case tok of
357
+ PipePipe -> pushToken (Spanned Pipe s' ) *> pushToken (Spanned Pipe s' ' )
358
+ _ -> pushToken (Spanned tok s)
359
+ }
360
+
351
361
-------------
352
362
-- Utility --
353
363
-------------
@@ -1133,7 +1143,7 @@ lambda_expr_block :: { Expr Span }
1133
1143
-- Lambda expression arguments block
1134
1144
lambda_args :: { Spanned [Arg Span] }
1135
1145
: ' ||' { Spanned [] (spanOf $1 ) }
1136
- | ' |' sep_byT(lambda_arg,' ,' ) ' |' { Spanned $2 ($1 # $3 ) }
1146
+ | ' |' sep_byT(lambda_arg,' ,' ) pipe ' |' { Spanned $2 ($1 # $4 ) }
1137
1147
1138
1148
1139
1149
-- Struct expression literal
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import Test.Framework.Providers.API
33
33
main :: IO ()
34
34
main = do
35
35
-- Check last time `rustc` version was bumped
36
- let lastDay = fromGregorian 2017 8 21
36
+ let lastDay = fromGregorian 2017 9 25
37
37
today <- utctDay <$> getCurrentTime
38
38
when (diffDays today lastDay > 32 ) $
39
39
putStrLn $ " \x1b [33m" ++ " \n The version of `rustc' the tests will try to use is older than 1 month" ++ " \x1b [0m"
You can’t perform that action at this time.
0 commit comments