Skip to content

Error messages should ideally report what source lines correspond to the error messages #6

@klinvill

Description

@klinvill

For example, instead of an error message like: called Result::unwrap()on anErr value: "Function expected 4 arg(s) of type [...], but was applied to 2 value(s).", it would be nice to have an error message that reports the line number for this erroneous function invocation.

My understanding is that Ravencheck may not have direct access to this info since it effectively just works at the macro level, but the line macro might be able to provide this info? https://doc.rust-lang.org/std/macro.line.html. According to the docs, it seems like it provides the line for the last macro, but that would still be an improvement to report which macro the error is associated with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions