I just ran into this error message because I was typing too quickly.
error: cannot find macro `prinltn` in this scope
--> src/main.rs:4:5
|
4 | prinltn!("s1 = {}, s2 = {}", s1, s2);
| ^^^^^^^ help: a macro with a similar name exists: `print`
--> /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/macros.rs:78:1
|
= note: similarly named macro `print` defined here
error: could not compile `playground` due to previous error
Does anyone know what the algorithm used was that determined that “print
” is more similar to “prinltn
” than “println
” is? Presumably some kind of edit-distance? Are there alternative/better algorithms that would handle a letter swap like this better?