aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/unchecked_tracked_local_rejected.zc
blob: a5f0d6d2275f474ae80b295764fc23fa36f239c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
// expect error: p: is tracked by the analyzer and can't be used in unchecked code
// spec 4.9
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() {
	int* p = rt.new(int);
	unchecked { *p = 2; }
	return 0;
}