Skip to content

regression: mismatched types #109747

Description

@Mark-Simulacrum

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

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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions