Skip to content

regression: mismatched types #109747

@Mark-Simulacrum

Description

@Mark-Simulacrum
Member

https://crater-reports.s3.amazonaws.com/beta-1.69-3/beta-2023-03-18/reg/proc-macro2-test-0.0.1/log.txt

[INFO] [stdout] error: mismatched function-like proc macro signature
[INFO] [stdout]  --> src/lib.rs:7:37
[INFO] [stdout]   |
[INFO] [stdout] 7 | pub fn demo(tokens: TokenStream) -> TokenStream {
[INFO] [stdout]   |                                     ^^^^^^^^^^^ found TokenStream, expected type `proc_macro::TokenStream`
[INFO] [stdout]   |
[INFO] [stdout]   = note: function-like proc macros must have a signature of `fn(TokenStream) -> TokenStream`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `proc-macro2-test` due to 3 previous errors
[INFO] [stdout] error: mismatched function-like proc macro signature
[INFO] [stdout]  --> src/lib.rs:7:21
[INFO] [stdout]   |
[INFO] [stdout] 7 | pub fn demo(tokens: TokenStream) -> TokenStream {
[INFO] [stdout]   |                     ^^^^^^^^^^^ found TokenStream, expected type `proc_macro::TokenStream`
[INFO] [stdout]   |
[INFO] [stdout]   = note: function-like proc macros must have a signature of `fn(TokenStream) -> TokenStream`

This code seems to have compiled fine previously -- even if this ends up not being a regression, we probably ought to call it a diagnostics bug, since the found/expected type message is pretty poor.

Activity

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Mar 30, 2023
added this to the 1.69.0 milestone on Mar 30, 2023
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Mar 30, 2023
compiler-errors

compiler-errors commented on Mar 30, 2023

@compiler-errors
Member

I cannot reproduce this ❓ Crater sometimes chokes on proc_macro2 though, right?

This diagnostic regression is due to #107314 I think, but also, I messed with this diagnostic recently in #109136 (though that's on nightly currently) so it may have gotten better 🤔 .

Mark-Simulacrum

Mark-Simulacrum commented on Mar 30, 2023

@Mark-Simulacrum
MemberAuthor

Hm, interesting. It's reproduced in crater ~3 times at least, but if we can't reproduce probably fine. If there was some problem here I'd expect far more crates to be broken than just this one.

removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Apr 3, 2023
added
regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
and removed on May 26, 2023
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on May 26, 2023
removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on May 26, 2023
Enselic

Enselic commented on Jun 4, 2024

@Enselic
Member

Triage: I can't imagine we will ever take action here, so let's close as not reproducible. We would likely have learned by know if this problem was genuine, if it was.

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

    T-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

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Enselic@compiler-errors@Mark-Simulacrum@apiraino@BoxyUwU

        Issue actions

          regression: mismatched types · Issue #109747 · rust-lang/rust