aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/not-a-pred-3.rs
blob: ea1b6cc0965710d661b3ad51b3c2ea5852b03e85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// -*- rust -*-
// xfail-boot

// error-pattern: expected the constraint name

obj f () {
  fn g (int q) -> bool {
    ret true;
  }
}

fn main() {
  auto z = f ();
  check (z.g)(42); // should fail to typecheck, as z.g isn't an explicit name
}