Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
vxx2
/
vlib
/
v
/
checker
/
tests
/
immutable_deref.vv
11
lines
·
9
sloc
·
129 bytes
·
e995d991f1279d3cee90bc4ea022f6cbcbedba96
Raw
1
struct Context {}
2
3
const ctx_ptr = &Context(unsafe { nil })
4
5
fn main() {
6
x := &ctx_ptr
7
unsafe {
8
*x = &Context{}
9
_ = x
10
}
11
}
12