My wish list for Rust 2024 and beyond

Not only is this not really a great reason to duplicate a feature (unless you were to also remove the previous notation), it would be ambiguous because ? already has another meaning, for example:

foo() ? - bar() ? -1 : 2

could be equivalent to:

if foo() { -bar()? - 1 } else { 2 }

or

if foo()? - bar { -1 } else { 2 }
4 Likes