rust/src/test/ui/macros/macro-name-typo.stderr
Ryan Cumming ecd47a91c7 Don't include bang in macro replacement suggestion
When we suggest the replacement for a macro we include the "!" in the
suggested replacement but the span only contains the name of the macro
itself. Using that replacement would cause a duplicate "!" in the
resulting code.

I originally tried to extend the span to be replaced by 1 byte in
rust-lang/rust#47424. However, @zackmdavis pointed out that there can be
whitespace between the macro name and the bang.

Instead, just remove the bang from the suggested replacement.

Fixes #47418
2018-01-15 18:09:52 +11:00

9 lines
241 B
Plaintext

error: cannot find macro `printlx!` in this scope
--> $DIR/macro-name-typo.rs:12:5
|
12 | printlx!("oh noes!"); //~ ERROR cannot find
| ^^^^^^^ help: you could try the macro: `println`
error: aborting due to previous error