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.
!
Nov 02 07:32:11.418 INFO kablam! error[E0282]: type annotations needed
Nov 02 07:32:11.418 INFO kablam! --> src/romaji.rs:80:24
Nov 02 07:32:11.418 INFO kablam! |
Nov 02 07:32:11.418 INFO kablam! 80 | x if x.is_youon() && buffer.is_katakana() => {
Nov 02 07:32:11.419 INFO kablam! | ^^^^^^^^ cannot infer type for `T`
Nov 02 07:32:11.419 INFO kablam! |
Nov 02 07:32:11.419 INFO kablam! = note: type must be known at this point
cc @rust-lang/libs
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鈥檛 asking for the 2018 edition, right? (I think we are still building the old style MIR if you don鈥檛 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 (46880f41b 2018-10-15) and rustc 1.31.0-nightly (bef62ccdd 2018-10-16)
Log of bors commits in that time in the details block
% git log 46880f41b..bef62ccdd --author bors --format=oneline
bef62ccddb911b9cd7677717a69348a62cf61f96 Auto merge of #54486 - orium:obligation-forest-graphviz, r=nikomatsakis
8a7048b72b7e9499dfae3f946baa92fc9e62a6b8 Auto merge of #54251 - varkor:silence-bad_style, r=Manishearth
99ab2f4071b959b0276862605d7107227c2fa76f Auto merge of #54937 - alexcrichton:update-stdsimd, r=nikomatsakis
5ea8eb55cd9f4547b332f43c9f723de30187c223 Auto merge of #55067 - ljedrz:generic_iterator_related_improvements, r=petrochenkov
df0d6ad9c1510630b234f6bb96a69a081de0b307 Auto merge of #55023 - euclio:llvm-error-handler, r=cuviper
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
Fixed by #55893?
Confirmed fixed as of nightly-2018-11-12 -- rustc 1.32.0-nightly (ca79ecd69 2018-11-11) -- and rustc 1.31.0-beta.9 (c341a5940 2018-11-12).
Most helpful comment
Minimized: