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

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

fn main() {
  foo();
}