Skip to content

[1.38] Regression: custom attribute panicked #63895

Closed
@petrochenkov

Description

@petrochenkov

#63628 (comment)

custom attribute panicked

[INFO] [stderr]    Compiling display-as v0.4.6 (/opt/crater/workdir)
[INFO] [stderr] error: custom attribute panicked
[INFO] [stderr]    --> tests/format_as.rs:104:5
[INFO] [stderr]     |
[INFO] [stderr] 104 |     #[with_template("Foo " self.0)]
[INFO] [stderr]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]     |
[INFO] [stderr]     = help: message: with_template must be applied to an impl that ends in '{}', not { }

One more victim to the pretty-printing changes (#62667), whitespace-related in this case.

Here's what the macro does:

    if last.to_string() != "{  }" {
        /* report error */
    }

Pretty unreliable check, isn't it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions