Fix ICE when passing block to while-loop condition by compiler-errors · Pull Req...
source link: https://github.com/rust-lang/rust/pull/94248
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
We were incorrectly delaying a bug when we passed any block (that evaluated to ()
) to a while loop. This PR makes the check a bit more sophisticated.
We should only suppress the error here in cases that are equivalent to those we find in #93574 (i.e. only while loop conditions that have destructuring assignment expressions in them).
Fixes #93997
cc @estebank who added this code
I would not be opposed to removing the delay-bug altogether, and just emitting this error always. I much prefer duplicate errors over no errors.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK