Remove Ternary Operator - #1705
Closed
pwoolcoc wants to merge 7 commits into
Closed
Conversation
added 7 commits
January 29, 2012 21:43
3 tests, pretty/block-disambig.rs, run-pass/operator-overloading.rs, and run-pass/weird-exprs.rs, all included the ternary operator. These were changed to use the if-then-else construct instead. 2 tests, run-pass/block-arg-in-ternary.rs and run-pass/ternary.rs, were only there because of the ternary operator, and were removed.
All the files below had at least one instance of the ternary operator present in the source. All have been changed to the equivalent if/then/else expression.
All tests now pass, without the ternary operator.
`expr_ternary`, `ternary_to_if`, and all parses & lexer definitions have been removed.
U007D
pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
3432: Feature/snippet completions r=matklad a=iTZAvishay This PR implements rust-lang#1705 and is based on rust-lang#3430 to avoid future conflicts. The completions are placing default values with the names of the parameters, demo:  Co-authored-by: Avishay Matayev <me@avishay.dev>
U007D
pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
Patch `--extern` arguments in `phase_cargo_rustc` as well Fixes rust-lang#1705.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For issue #1698.
In commit ccebc79, the ternary operator is completely gone.
Commit ac2e855 leaves the definition and helper functions for the operator in, but removes all use of it from src/.