This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
8d381823e2
rust
/
src
/
test
/
run-pass
/
fn-expr.rs
6 lines
100 B
Rust
Raw
Normal View
History
Unescape
Escape
Add xfail-stage0 to some tests (not sure if it matters...)
2011-06-14 13:28:34 -05:00
// xfail-stage0
Implement function expressions/anonymous functions Looks like 'fn(..arg..) -> ret {body;}. They don't support type parameters or upvars yet.
2011-06-14 08:20:04 -05:00
fn
main
(
)
{
auto
x
=
fn
(
int
a
)
->
int
{
ret
a
+
1
;
}
;
assert
(
x
(
4
)
=
=
5
)
;
}
Reference in New Issue
Copy Permalink