We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Inspecting the CI of this crate I just found out that type inference for it no longer works. This happened about 23 days ago.
The code below is a reduced example that fails with the same error. Link to playground.
enum Foo { A, B } impl Foo { fn is_a(&self) -> bool { if let Foo::A = self { true } else { false } } } impl<'a> From<&'a str> for Foo { fn from(input: &'a str) -> Self { if input == "a" { Foo::A } else { Foo::B } } } fn foo(input: &str) { match input.into() { ref foo if foo.is_a() => println!("Foo::A"), Foo::B => println!("Foo::B"), _ => panic!() } }
NOTE: The compiler can infer the types correctly if we swap the first two match arms.
Is this a bug in the compiler or wanted behavior? I am wondering since the compiler was able to infer types correctly about 23 days ago.
CI here: https://travis-ci.org/Robbepop/stevia/jobs/452228341
The text was updated successfully, but these errors were encountered:
Same issue as in #55810, will be fixed by #55819
Sorry, something went wrong.
Closing in favor of #55810.
No branches or pull requests
Inspecting the CI of this crate I just found out that type inference for it no longer works. This happened about 23 days ago.
The code below is a reduced example that fails with the same error. Link to playground.
NOTE: The compiler can infer the types correctly if we swap the first two match arms.
Is this a bug in the compiler or wanted behavior?
I am wondering since the compiler was able to infer types correctly about 23 days ago.
CI here: https://travis-ci.org/Robbepop/stevia/jobs/452228341
The text was updated successfully, but these errors were encountered: