Update Examples
parent
38915c6c13
commit
93220029bf
@ -1008,3 +1008,9 @@ as the spirit moves you.
|
|||||||
|
|
||||||
#### if-let
|
#### if-let
|
||||||
It seems the only new point relevant to Husht that arises here is the need to try to do auto-import for destructuring if-let (and maybe just destructuring lets as well), so that if Foo is a enum with variants Bar and Baz, and `a` is of type Foo, then you can write just `if let Bar = a ...` rather than `if let Foo::Bar = a ...`. (To be clear, the intention is to tightly scope these auto-imports so that the name Bar doesn't "leak" into the surrounding code from places in which there is a clear implication (such as destructuring a Foo) that they should be in scope.
|
It seems the only new point relevant to Husht that arises here is the need to try to do auto-import for destructuring if-let (and maybe just destructuring lets as well), so that if Foo is a enum with variants Bar and Baz, and `a` is of type Foo, then you can write just `if let Bar = a ...` rather than `if let Foo::Bar = a ...`. (To be clear, the intention is to tightly scope these auto-imports so that the name Bar doesn't "leak" into the surrounding code from places in which there is a clear implication (such as destructuring a Foo) that they should be in scope.
|
||||||
|
|
||||||
|
#### let-else
|
||||||
|
#### while-let
|
||||||
|
|
||||||
|
Apparently nothing else new in these sections.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user