1 // Regression test for issue #90870.
7 const fn f(a: &u8, b: &u8) -> bool {
9 //~^ ERROR: cannot call non-const operator in constant functions [E0015]
10 //~| HELP: consider dereferencing here
11 //~| HELP: add `#![feature(const_trait_impl)]`
14 const fn g(a: &&&&i64, b: &&&&i64) -> bool {
16 //~^ ERROR: cannot call non-const operator in constant functions [E0015]
17 //~| HELP: consider dereferencing here
18 //~| HELP: add `#![feature(const_trait_impl)]`
21 const fn h(mut a: &[u8], mut b: &[u8]) -> bool {
22 while let ([l, at @ ..], [r, bt @ ..]) = (a, b) {
24 //~^ ERROR: cannot call non-const operator in constant functions [E0015]
25 //~| HELP: consider dereferencing here
26 //~| HELP: add `#![feature(const_trait_impl)]`
34 a.is_empty() && b.is_empty()