Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created April 26, 2012 02:06
Show Gist options
  • Save nikomatsakis/2495187 to your computer and use it in GitHub Desktop.
Save nikomatsakis/2495187 to your computer and use it in GitHub Desktop.
resource rsrc(_x: ()) {
#error["Hello, world!"];
}
fn hide_rsrc() -> fn@() {
let r = @rsrc(());
ret fn@[move r]() { #error["You got me."]; };
}
fn do_not_pass_go() { fail; }
fn main() {
let x = hide_rsrc();
fail;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment