12 lines
405 B
Rust
12 lines
405 B
Rust
// atomic does not imply atomic.weak: effect sets are flat.
|
|
// phase: 6
|
|
// spec: docs/spec/05-effects-and-capabilities.md §9.2/§9.3
|
|
// expect: reject E3101
|
|
// AIR twin: phase2/reject/flat_effects.air
|
|
module test.source_flat_effects
|
|
fn relaxed_work() -> void effects [atomic.weak] {}
|
|
fn f() -> void effects [atomic] {
|
|
relaxed_work(); // diagnostic here
|
|
}
|
|
fn main() -> u64 effects [] { return 0u64; }
|