Warn
Emits a compiler warning at every call site of the annotated function. The function remains callable; the warning is informational.
Syntax
#Warn("Message")
func DoSomething() {
// Implementation
}
Examples
Deprecation notice
#Warn("Use NewApi() instead; OldApi() will be removed in v2.0")
func OldApi() -> int32 {
return NewApi();
}
func Main() -> int {
OldApi(); // warning: Use NewApi() instead; OldApi() will be removed in v2.0
return 0;
}
Unsafe operation advisory
#Warn("This function bypasses bounds checking; ensure the index is valid")
func UncheckedGet(arr: *int32, index: uint) -> int32 {
return *(arr + index);
}
See Also
#Error— block usage outright instead of warning- Attributes — the full attribute set
Abi
Selects the calling convention a function is compiled with — the contract for how arguments, the return value, and the stack are arranged. Most code never needs it: Rux uses the right convention for the target automatically. Reach for #Abi at a foreign boundary that must follow a specific ABI regardless of the platform default.
Error
Emits a compiler error at every call site of the annotated function. The build fails at any point where the function is called. Use it to intentionally block usage of a function — for example, to enforce that a stub or unsupported path is never called.