Skip to content

Smart asserts #2367

Closed
Closed
@jesse99

Description

@jesse99

It would be great if when asserts failed they printed something more useful than the offending line. Currently they print something like:

Assertion 'x < y + bar() failed', src/foo.rs:561

It'd be way nicer if they printed the values of variables that they use and the results of the functions they call:

Assertion 'x{10} < y{2} + bar(){4} failed', src/foo.rs:561

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-syntaxextArea: Syntax extensionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions