Skip to content

expected suffix token in proc macro #75453

Open

Activity

added
E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
on Aug 12, 2020
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Aug 12, 2020
Mark-Simulacrum

Mark-Simulacrum commented on Aug 12, 2020

@Mark-Simulacrum
MemberAuthor

cc @petrochenkov proc macros / parser / resolution

petrochenkov

petrochenkov commented on Aug 12, 2020

@petrochenkov
Contributor

The first two regressions are known from #73345 (comment), older versions of cpp-macros relied on some incorrect pretty-printing from rustc.

Not sure about the third regression, perhaps @Aaron1011 has seen it in one of the other expansion-related PRs.

Aaron1011

Aaron1011 commented on Aug 12, 2020

@Aaron1011
Member

The static_map_macros regressions is also due to pretty-printing changes:

https://github.com/cbreeden/static-map/blob/14cada499fcbdeacf0735775978320f226876f8b/static_map_macros/src/lib.rs#L15-L25:

const LEADING: &str = "enum __StaticMap__ {\n    A =\n        static_map!(@ zero";
const TRAILING: &str = "),\n}";

fn trim(input: &str) -> &str {
    assert!(input.starts_with(LEADING));
    assert!(input.ends_with(TRAILING));

    let (_, input) = input.split_at(LEADING.len());
    let (input, _) = input.split_at(input.len() - TRAILING.len());
    input.trim()
}

Before/after:

enum __StaticMap__ {\n    A =\n        static_map!(@ zero
enum __StaticMap__\n{\n    A = static_map !\n    (@ zero
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Aug 12, 2020
spastorino

spastorino commented on Aug 19, 2020

@spastorino
Member

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

added and removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Aug 19, 2020
added a commit that references this issue on Aug 30, 2020
added
regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
and removed on Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-proc-macrosArea: Procedural macrosC-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @spastorino@Aaron1011@pietroalbini@Mark-Simulacrum@petrochenkov

        Issue actions

          expected suffix token in proc macro · Issue #75453 · rust-lang/rust