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: hard error on ? in type #94510

Closed
Mark-Simulacrum opened this issue Mar 1, 2022 · 4 comments
Closed

regression: hard error on ? in type #94510

Mark-Simulacrum opened this issue Mar 1, 2022 · 4 comments
Labels
P-medium Medium priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

Crater picked up this issue in:

[INFO] [stdout] error: invalid `?` in type
[INFO] [stdout]   --> src/tests.rs:65:26
[INFO] [stdout]    |
[INFO] [stdout] 65 |     let foo = fn_expr!{ o?.when(|&i| i > 0)?.when(|&i| i%2 == 0) };
[INFO] [stdout]    |                          ^ `?` is only allowed on expressions, not types
[INFO] [stdout]    |
[INFO] [stdout] help: if you meant to express that the type might not contain a value, use the `Option` wrapper type
[INFO] [stdout]    |
[INFO] [stdout] 65 |     let foo = fn_expr!{ Option<o>.when(|&i| i > 0)?.when(|&i| i%2 == 0) };
[INFO] [stdout]    |                         +++++++ ~
[INFO] [stdout] 

cc @estebank likely introduced by #92746

@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 1, 2022
@Mark-Simulacrum Mark-Simulacrum added this to the 1.60.0 milestone Mar 1, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 1, 2022
@estebank
Copy link
Contributor

estebank commented Mar 2, 2022

Oh that sucks... :(

Feel free to revert and backport. It likely only affects macros and can be fixed easily, but don't have the time now to look for it.

@apiraino
Copy link
Contributor

apiraino commented Mar 3, 2022

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 3, 2022
@Dylan-DPC
Copy link
Member

Dylan-DPC commented Mar 3, 2022

working on the revert if nobody has got to it yet

#94574

estebank added a commit to estebank/rust that referenced this issue Mar 4, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
cuviper pushed a commit to cuviper/rust that referenced this issue Mar 18, 2022
Follow up to rust-lang#92746. Address rust-lang#94510.

(cherry picked from commit 004f2ed)
@Mark-Simulacrum
Copy link
Member Author

Should be fixed on beta with #95061 and nightly with #94593.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. 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

5 participants