You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structS{field1:u32,field2:Option<u32>,field3:Result<u32,u32>,}let my_s = S{field1:42,field2:Some(42),field3:Ok(42),};match my_s.// When asked for completions in this position it should prioritize fields or methods that return options.
This should generalize to matches!. This already works well for let Some() and if let Some()
The text was updated successfully, but these errors were encountered:
enumA{Foo,Bar,Baz,}structB{field1:A,}structC{field1:B,field2:A,}let my_c:C = /* ... */;match my_c.// should we suggest field1 or field2?
I would say that the "matchability" of any given field depends so much on context we really do not have that we're probably best off just trying to behave predictably
This should generalize to
matches!
. This already works well forlet Some()
andif let Some()
The text was updated successfully, but these errors were encountered: