10 lines
321 B
Rust
10 lines
321 B
Rust
// expect: reject E7006
|
|
// phase: 6
|
|
// spec: docs/spec/15-source-language.md §10
|
|
module test.store_modes
|
|
struct Pair { a: u64 }
|
|
struct Box { pair: Pair, data: [u64; 2] }
|
|
fn stop() -> never effects [] { trap; }
|
|
fn unused(p: ref<[u64; 2]>) -> void effects [] { *p = [1u64; 2]; }
|
|
fn main() -> u64 effects [] { return 42; }
|