Trade stack closure copyability for type soundness.
This commit is contained in:
parent
98c169e4e5
commit
d4722e5333
3 changed files with 37 additions and 15 deletions
|
|
@ -29,6 +29,6 @@ fn main() {
|
|||
copy2(boxed);
|
||||
let owned: ~fn() = || {};
|
||||
copy2(owned); //~ ERROR does not fulfill `Copy`
|
||||
let borrowed: &fn() = || {};
|
||||
let borrowed: &fn:Copy() = || {};
|
||||
copy2(borrowed); //~ ERROR does not fulfill `'static`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue