Skip to content

Cache Terminal in libsyntax #6827

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

Closed
emberian opened this issue May 30, 2013 · 0 comments · Fixed by #7716
Closed

Cache Terminal in libsyntax #6827

emberian opened this issue May 30, 2013 · 0 comments · Fixed by #7716

Comments

@emberian
Copy link
Member

syntax::diagnostic::print_diagnostic currently parses the terminfo entry every time it is called, which is wildly inefficient and apt to create churn. Being an error/warning codepath, its efficiency is not key, but it'd be nice if the Terminal could be cached somewhere (TLS?)

bors added a commit that referenced this issue Jul 14, 2013
Teach `extra::term` to support more terminal attributes than just color.

Fix the compiler diagnostic messages to print in bold instead of bright white. This matches Clang's output.

Cache the term::Terminal instead of re-parsing for every diagnostic (fixes #6827).
@bors bors closed this as completed in 1d4c314 Jul 15, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue 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 a pull request may close this issue.

1 participant