aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/io-infects-caller.rs
blob: b07f46e6d20cadfc0b785211d96df8cb1935d04d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
// error-pattern: calculated effect is 'impure'

impure fn foo() {
  let chan[int] c = chan();
  c <| 10;
}

fn main() {
  foo();
}