safe-goto

Emulating a safe goto-like instruction in Rust in the spirit of the "Safe goto with value" pre-RFC from IRLO

The crate contains a single macro, safe_goto, which emulates goto with value using a loop wrapping a match on an enum.

Goals

The purpose of this crate is two-fold:

Non-goals:

Examples

The tests and examples contain some examples of the functionality. You can have a look at the expanded macro using tools like cargo-expand.