aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/global_borrowed.zc
blob: 3dc37603eee2591ef88f796c3146b5306848542e (plain) (blame)
1
2
3
4
5
6
7
namespace;
include rt;

// expect: p: is not an owner, so it can't be stored in a global
let g;
fn keep(.m p) { g = p; return 0; }
fn main() { let x = rt.new(1); keep(x); return 0; }