Skip to content

writeln! and println! (and builtin macros’?) diagnostics are terrible #23459

Closed
@nagisa

Description

@nagisa
<std macros>:4:19: 4:46 error: invalid reference to argument `1` (there is 1 argument)
<std macros>:4 write ! ( $ dst , concat ! ( $ fmt , "\n" ) , $ ( $ arg ) * ) ) ;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~

<std macros>:3:11: 3:38 error: invalid reference to argument `2` (there are 2 arguments)
<std macros>:3 print ! ( concat ! ( $ fmt , "\n" ) , $ ( $ arg ) * ) ) ;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~

I’d expect it to at least emit an in expansion of writeln! and in expansion of println! hints which it doesn’t currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions