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: can't compare X with _ in const contexts #100543

Closed
Mark-Simulacrum opened this issue Aug 14, 2022 · 7 comments · Fixed by #100336
Closed

regression: can't compare X with _ in const contexts #100543

Mark-Simulacrum opened this issue Aug 14, 2022 · 7 comments · Fixed by #100336
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

Found in crater:

@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 Aug 14, 2022
@Mark-Simulacrum Mark-Simulacrum added this to the 1.64.0 milestone Aug 14, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 14, 2022
@compiler-errors
Copy link
Member

searched nightlies: from nightly-2022-04-01 to nightly-2022-08-11
regressed nightly: nightly-2022-07-28
searched commit range: 4d6d601...2643b16
regressed commit: 2a22093

bisected with cargo-bisect-rustc v0.6.3

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start=2022-04-01 -- build 

This regressed in #99704 cc @fee1-dead

@compiler-errors
Copy link
Member

Maybe "regressed" is better here, maybe it's a legitimate reason to fail. Haven't looked into it.

@fee1-dead
Copy link
Member

I'm going to look into this later, but it seems like a case of wf checks requiring const bounds.

@fee1-dead
Copy link
Member

Repro:

#[derive(PartialEq)]
struct S;

const FOO: fn(&S, &S) -> bool = S::eq;

@apiraino
Copy link
Contributor

Just to be sure I understood: is the regression about code that should compile in the next Rust 1.64 or is that code now invalid code and the regression is just a bad diagnostic? thanks!

@fee1-dead
Copy link
Member

@apiraino The code is valid. It should compile in the next Rust 1.64. Hope that helps.

@apiraino
Copy link
Contributor

WG-prioritization assigning priority (Zulip discussion).

@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 Aug 17, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Aug 22, 2022
…it, r=oli-obk

Fix two const_trait_impl issues

r? `@oli-obk`

Fixes rust-lang#100222.
Fixes rust-lang#100543.
@bors bors closed this as completed in 14c8a68 Aug 22, 2022
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

Successfully merging a pull request may close this issue.

5 participants