Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: mismatched types #109747

Closed
Mark-Simulacrum opened this issue Mar 30, 2023 · 3 comments
Closed

regression: mismatched types #109747

Mark-Simulacrum opened this issue Mar 30, 2023 · 3 comments
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
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.

@Mark-Simulacrum Mark-Simulacrum added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Mar 30, 2023
@Mark-Simulacrum Mark-Simulacrum added this to the 1.69.0 milestone Mar 30, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 30, 2023
@compiler-errors
Copy link
Member

compiler-errors commented Mar 30, 2023

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
Copy link
Member Author

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.

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 3, 2023
@Mark-Simulacrum Mark-Simulacrum added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels May 26, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 26, 2023
@BoxyUwU BoxyUwU removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 26, 2023
@Enselic
Copy link
Member

Enselic commented Jun 4, 2024

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.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants