[rust-dev] Fall-through in alt, break&continue by label

Henri Sivonen hsivonen at iki.fi
Tue Apr 10 05:53:42 PDT 2012


It appears that Rust does not to have labeled loops with break and
continue by label the way Java has.  Also, it appears that alt does
not have fall-through the way switch in C has.

Are break and continue by label and/or fall-through in alt supported
in some non-obvious and unadvertised way?  If not, are there plans to
add to these features?  (While I understand that fall-through in
switch is largely considered a misfeature, break and continue by label
seem less controversial.)

If there are no plans to add these features, what are the recommended
ways to emulate these features in a way that compiles to efficient
machine code?

The use case I have is targeting Rust with the translator that
currently targets C++ and generates the HTML parser in Gecko. (It uses
goto hidden behind macros to emulate break and continue by label in
C++.)

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/


More information about the Rust-dev mailing list