Add a temporary syntax for bare functions
Bare functions will be represented as 'fn#' until they're implemented. Then we'll switch it over to just 'fn'. Issue #1022
This commit is contained in:
parent
2a0644f882
commit
9c46cc58cb
3 changed files with 35 additions and 8 deletions
6
src/test/run-pass/fn-bare-anon.rs
Normal file
6
src/test/run-pass/fn-bare-anon.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
let f: fn#() = fn# () {
|
||||
log "This is a bare function"
|
||||
};
|
||||
f();
|
||||
}
|
||||
7
src/test/run-pass/fn-bare-item.rs
Normal file
7
src/test/run-pass/fn-bare-item.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fn# f() {
|
||||
log "This is a bare function";
|
||||
}
|
||||
|
||||
fn main() {
|
||||
f();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue