mirror of https://github.com/rust-lang/rust.git
Add two tests, one xfailed, for inferring lambda kinds in return position
This commit is contained in:
parent
494264711d
commit
fa6a446e6c
|
@ -0,0 +1,9 @@
|
|||
// Test that the lambda kind is inferred correctly as a return
|
||||
// expression
|
||||
|
||||
fn shared() -> fn@() { ret || (); }
|
||||
|
||||
fn unique() -> fn~() { ret || (); }
|
||||
|
||||
fn main() {
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// xfail-test fn~ is not inferred
|
||||
// Test that the lambda kind is inferred correctly as a return
|
||||
// expression
|
||||
|
||||
fn shared() -> fn@() { || () }
|
||||
|
||||
fn unique() -> fn~() { || () }
|
||||
|
||||
fn main() {
|
||||
}
|
Loading…
Reference in New Issue