// Test rules governing higher-order pure fns. fn take(_v: T) {} fn assign_to_pure(x: pure fn(), y: fn(), z: unsafe fn()) { take::(x); take::(y); //~ ERROR expected pure fn but found impure fn take::(z); //~ ERROR expected pure fn but found unsafe fn } fn assign_to_impure(x: pure fn(), y: fn(), z: unsafe fn()) { take::(x); take::(y); take::(z); //~ ERROR expected impure fn but found unsafe fn } fn assign_to_unsafe(x: pure fn(), y: fn(), z: unsafe fn()) { take::(x); take::(y); take::(z); } fn assign_to_pure2(x: pure fn@(), y: fn@(), z: unsafe fn@()) { take::(x); take::(y); //~ ERROR expected pure fn but found impure fn take::(z); //~ ERROR expected pure fn but found unsafe fn take::(x); //~ ERROR expected ~ closure, found @ closure take::(y); //~ ERROR expected ~ closure, found @ closure take::(z); //~ ERROR expected ~ closure, found @ closure take::(x); //~ ERROR expected ~ closure, found @ closure take::(y); //~ ERROR expected ~ closure, found @ closure take::(z); //~ ERROR expected ~ closure, found @ closure } fn main() { }