Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade terminfo #7133

Closed
wants to merge 7 commits into from
Closed

Upgrade terminfo #7133

wants to merge 7 commits into from

Conversation

lilyball
Copy link
Contributor

Implement conditional support in terminfo, along with a few other related operators.

Fix implementation of non-commutative arithmetic operators.

Remove all known cases of task failure from terminfo::parm::expand, and change the method signature.

Fix some other miscellaneous issues.

emberian and others added 7 commits June 14, 2013 12:37
Take a new struct Variables instead of two &mut [] vectors for static
and dynamic variables.
Replace all potentially-failing operations with Err returns and add
tests.

Remove the Char parameter type; characters are represented as Numbers.

Fix integer constants to work properly when there are multiple constants
in the same capability string.

Tweak loop to use iterators instead of indexing into cap.
Implement the %?, %t, %e, and %; operators. Also implement the %<, %=,
%> operators, without which conditionals aren't very useful.

Fix the order of parameters for the arithmetic operators.

Implement the missing %^ operator.
@lilyball
Copy link
Contributor Author

r? @thestinger

bors added a commit that referenced this pull request Jun 15, 2013
Implement conditional support in terminfo, along with a few other related operators.

Fix implementation of non-commutative arithmetic operators.

Remove all known cases of task failure from `terminfo::parm::expand`, and change the method signature.

Fix some other miscellaneous issues.
@bors bors closed this Jun 15, 2013
_ => return Err(~"non-number on stack with %~")
}
} else { return Err(~"stack is empty") },
'i' => match (copy mparams[0], copy mparams[1]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit late for this, but does this do the correct thing? I would've though the copy means that mparams[0] and mparams[1] are not modified by the +='s below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, good point. I don't think the tests covered this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I submitted #7160 to fix this

flip1995 pushed a commit to flip1995/rust that referenced this pull request May 20, 2021
Add `needless_bitwise_bool` lint

fixes rust-lang#6827
fixes rust-lang#1594

changelog: Add ``[`needless_bitwise_bool`]`` lint

Creates a new `bitwise_bool` lint to convert `x & y` to `x && y` when both `x` and `y` are booleans. I also had to adjust thh `needless_bool` lint slightly, and fix a couple failing dogfood tests. I made it a correctness lint as per flip1995's comment [here](rust-lang/rust-clippy#3385 (comment)), from a previous WIP attempt at this lint.
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.

5 participants