Skip to content

Remove Ternary Operator - #1705

Closed
pwoolcoc wants to merge 7 commits into
rust-lang:masterfrom
pwoolcoc:master
Closed

Remove Ternary Operator#1705
pwoolcoc wants to merge 7 commits into
rust-lang:masterfrom
pwoolcoc:master

Conversation

@pwoolcoc

Copy link
Copy Markdown

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/.

Paul Woolcock 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.
@marijnh marijnh mentioned this pull request Jan 31, 2012
@brson brson closed this Jan 31, 2012
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: 
![call_me_demo](https://user-images.githubusercontent.com/5567310/75828341-461ca400-5db4-11ea-88d8-88e59ac1a197.gif)


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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants