Add test for println! typo

This commit is contained in:
Jacob Pratt 2023-02-18 00:34:41 +00:00
parent ff052eec80
commit c2f2a3cff2
No known key found for this signature in database
GPG Key ID: 6E2E55C5F9ABB247
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,6 @@
// https://internals.rust-lang.org/t/18227
fn main() {
prinltn!(); //~ ERROR cannot find macro `prinltn` in this scope
//^ a macro with a similar name exists: `println`
}

View File

@ -0,0 +1,11 @@
error: cannot find macro `prinltn` in this scope
--> $DIR/println-typo.rs:4:5
|
LL | prinltn!();
| ^^^^^^^ help: a macro with a similar name exists: `println`
--> $SRC_DIR/std/src/macros.rs:LL:COL
|
= note: similarly named macro `println` defined here
error: aborting due to previous error