Skip to content

Commit c2f2a3c

Browse files
committed
Add test for println! typo
1 parent ff052ee commit c2f2a3c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/ui/did_you_mean/println-typo.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// https://internals.rust-lang.org/t/18227
2+
3+
fn main() {
4+
prinltn!(); //~ ERROR cannot find macro `prinltn` in this scope
5+
//^ a macro with a similar name exists: `println`
6+
}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error: cannot find macro `prinltn` in this scope
2+
--> $DIR/println-typo.rs:4:5
3+
|
4+
LL | prinltn!();
5+
| ^^^^^^^ help: a macro with a similar name exists: `println`
6+
--> $SRC_DIR/std/src/macros.rs:LL:COL
7+
|
8+
= note: similarly named macro `println` defined here
9+
10+
error: aborting due to previous error
11+

0 commit comments

Comments
 (0)