-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
romaji fails to build on beta, #55810
Comments
Minimized: struct S;
impl S {
fn method(&self) -> bool {
unimplemented!()
}
}
fn get<T>() -> T {
unimplemented!()
}
fn main() {
match get() {
x if x.method() => {}
&S => {}
}
} |
@rust-lang/compiler because this doesn't look to be caused by a library change. |
Hmm I wonder if this is some sort of bad interaction between 1. the new way to do pat variables in guards (which is activated by NLL) and 2. Method lookup and/or autoref... ... but this test isn’t asking for the 2018 edition, right? (I think we are still building the old style MIR if you don’t request NLL. But maybe that changed ...) |
This can be caused by the typeck order. To make this work, all arms' patterns must be checked before any guards are. |
This was injected between rustc 1.31.0-nightly (46880f4 2018-10-15) and rustc 1.31.0-nightly (bef62cc 2018-10-16) Log of bors commits in that time in the details block % git log 46880f4..bef62cc --author bors --format=oneline |
Hmm this line in the description of #55067 set off some alarm bells in my head: typeck: don't collect into a vector when unnecessary |
…ts-eagerly, r=oli-obk Typecheck patterns of all match arms first, so we get types for bindings Fix eventually (after backport to beta) the issue rust-lang#55810
Fixed by #55893? |
romaji, cc @uzimith
With a few minutes of time invested I wasn't able to narrow this down to a smaller example that still succeeded on stable.
cc @rust-lang/libs
The text was updated successfully, but these errors were encountered: