CARDIAC › rust-cardiac › Message codes › RCE0007
RCE0007error
A function or constant the compiler doesn't have.
error[RCE0007]: call to unknown function {callee}
error[RCE0007]: unknown const {name}
A call to a function, or a use of a constant, whose body the compiler was never given.
The compiler compiles the functions of your program and of the crates it uses. A function of the standard library that rustc calls rather than inlining (core::...) has no body here unless cargo-cardiac writes it itself, as it does for many of them. The same goes for a constant it can't find.
Write what the function does in your own code. A library method rustc inlines at opt-level 2 and calls at 1 may compile at 2.
// in place of a library method the compiler doesn't have: the loop it stands for
let mut s = 0;
while (s + 1) * (s + 1) <= a {
s += 1;
}
In a terminal: cargo cardiac help RCE0007.