rust/tests/ui/suggestions/suggest_print_over_printf.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
225 B
Rust
Raw Normal View History

2022-11-29 00:56:43 +00:00
// Suggest print macro when user erroneously uses printf
fn main() {
let x = 4;
printf("%d", x);
//~^ ERROR cannot find function `printf` in this scope
//~| HELP you may have meant to use the `print` macro
}