mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 18:12:51 +00:00
Add test for println!
typo
This commit is contained in:
parent
ff052eec80
commit
c2f2a3cff2
6
tests/ui/did_you_mean/println-typo.rs
Normal file
6
tests/ui/did_you_mean/println-typo.rs
Normal 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`
|
||||
}
|
11
tests/ui/did_you_mean/println-typo.stderr
Normal file
11
tests/ui/did_you_mean/println-typo.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user