Skip to content

Incorrect path printed on error #5463

@nazar-pc

Description

@nazar-pc
nazar-pc@nazar-pc:/w/s/subspace> rustfmt --version
rustfmt 1.5.1-nightly (62b272d 2022-07-21)
nazar-pc@nazar-pc:/w/s/subspace> rustfmt --config error_on_line_overflow=true crates/pallet-subspace/src/lib.rs
error[internal]: line formatted, but exceeded maximum width (maximum: 100 (see `max_width` option), found: 105)
   --> /web/subspace/subspace/crates/pallet-subspace/src/lib.rs:478:478:101
    |
478 |         #[pallet::weight((<T as Config>::WeightInfo::report_equivocation(), DispatchClass::Operational))]
    |                                                                                                     ^^^^^
    |

error[internal]: line formatted, but exceeded maximum width (maximum: 100 (see `max_width` option), found: 128)
   --> /web/subspace/subspace/crates/pallet-subspace/src/lib.rs:493:493:101
    |
493 |         #[pallet::weight((<T as Config>::WeightInfo::store_root_blocks(root_blocks.len()), DispatchClass::Mandatory, Pays::No))]
    |                                                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |

warning: rustfmt has failed to format. See previous 2 errors.

This is inconvenient when I want to open the file at that line in IDE afterwards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions