Skip to content

Error without line number (macros, deriving type) #33949

Closed
@dhardy

Description

@dhardy

Try compiling this:

fn main() {
    let v = vec![];
}

The error message never mentions a line number outside of the macro.

error: unable to infer enough type information about `_`; type annotations or generic parameter binding required [--explain E0282]
 --> <std macros>:3:1
3 |> < [ _ ] > :: into_vec ( box [ $ ( $ x ) , * ] ) ) ; ( $ ( $ x : expr , ) * )
  |> ^^^^^^^^^^^^^^^^^^^^^
<std macros>:3:1: 3:22: note: in this expansion of vec! (defined in <std macros>)

error: aborting due to previous error
playpen: application terminated with error code 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions