blob: 7d817d09c7f0b98840235adad3ce90d53dfa3cb1 [file] [log] [blame]
#![feature(const_trait_impl, effects)]
const fn test() -> impl ~const Fn() { //~ ERROR `~const` can only be applied to `#[const_trait]` traits
//~^ ERROR cycle detected
const move || { //~ ERROR const closures are experimental
let sl: &[u8] = b"foo";
match sl {
[first, remainder @ ..] => {
assert_eq!(first, &b'f');
//~^ ERROR can't compare `&u8` with `&u8`
}
[] => panic!(),
}
}
}
fn main() {}