Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c5ad97d
Use IsTerminal in rustc_errors
joshtriplett Oct 16, 2022
34f61dd
Use IsTerminal in rustc_driver
joshtriplett Oct 16, 2022
d60ba29
Use IsTerminal in rustc_log
joshtriplett Oct 16, 2022
e3d44dd
Use IsTerminal in librustdoc
joshtriplett Oct 16, 2022
7c60236
Fix build of thumbv7a-pc-windows-msvc
arlosi Nov 4, 2022
654a4e8
check if current stage is target build stage r=ozkanonur
onur-ozkan Nov 12, 2022
80d5359
normalize source paths from sysroot in compiletest
pietroalbini Nov 4, 2022
470423c
normalize download-rustc's prefix when running compiletests
pietroalbini Nov 16, 2022
867582e
detect () to avoid redundant <> suggestion for type
Nov 16, 2022
b8a5b02
Don't focus on notable trait parent when hiding it
GuillaumeGomez Nov 18, 2022
d49c10a
Make "long type" printing type aware
estebank Nov 16, 2022
787e633
On overflow errors, do not print out long types
estebank Nov 17, 2022
4ed1376
On E0275 do not print out the full type in the msg
estebank Nov 17, 2022
3debf50
Only use `...` instead of `_` for type elision
estebank Nov 17, 2022
bcb2655
review comment
estebank Nov 17, 2022
35f8962
Update cargo
weihanglo Nov 18, 2022
59c856c
Fix invalid focus when blurring notable traits popover
GuillaumeGomez Nov 18, 2022
c4165f3
drive-by: Add is_async fn to hir::IsAsync
compiler-errors Nov 19, 2022
9a9d0f4
Improve spans for RPITIT object-safety errors
compiler-errors Nov 19, 2022
87f81b0
Extend GUI test to check notable traits blur behaviour
GuillaumeGomez Nov 18, 2022
5ed8dca
Update browser-ui-test version to 0.13.2
GuillaumeGomez Nov 18, 2022
afab05b
Migrate top buttons style to CSS variables
GuillaumeGomez Nov 19, 2022
52cc0d5
Rollup merge of #103117 - joshtriplett:use-is-terminal, r=eholk
matthiaskrgr Nov 19, 2022
4451e28
Rollup merge of #103969 - ferrocene:pa-download-rustc-ui-tests, r=jyn514
matthiaskrgr Nov 19, 2022
747f29f
Rollup merge of #103989 - arlosi:arm32-panic, r=Amanieu
matthiaskrgr Nov 19, 2022
d6298d3
Rollup merge of #104076 - ozkanonur:fix-ci-rustc-sysroot, r=jyn514
matthiaskrgr Nov 19, 2022
06707c0
Rollup merge of #104469 - estebank:long-types, r=oli-obk
matthiaskrgr Nov 19, 2022
e86f184
Rollup merge of #104497 - lyming2007:issue-104379-fix, r=fee1-dead
matthiaskrgr Nov 19, 2022
e2dcc28
Rollup merge of #104577 - GuillaumeGomez:remove-focus-on-blur, r=notr…
matthiaskrgr Nov 19, 2022
c916a8d
Rollup merge of #104587 - weihanglo:update-cargo, r=weihanglo
matthiaskrgr Nov 19, 2022
c571b2a
Rollup merge of #104593 - compiler-errors:rpitit-object-safety-spans,…
matthiaskrgr Nov 19, 2022
f69f4cb
Rollup merge of #104604 - GuillaumeGomez:migrate-top-button-to-css-va…
matthiaskrgr Nov 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use IsTerminal in rustc_driver
  • Loading branch information
joshtriplett committed Oct 16, 2022
commit 34f61dd56718261548f58e9cd6bb9c4146825a1e
6 changes: 3 additions & 3 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! This API is completely unstable and subject to change.

#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(is_terminal)]
#![feature(once_cell)]
#![recursion_limit = "256"]
#![allow(rustc::potential_query_instability)]
Expand All @@ -26,7 +27,6 @@ use rustc_feature::find_gated_cfg;
use rustc_interface::util::{self, collect_crate_types, get_codegen_backend};
use rustc_interface::{interface, Queries};
use rustc_lint::LintStore;
use rustc_log::stdout_isatty;
use rustc_metadata::locator;
use rustc_save_analysis as save;
use rustc_save_analysis::DumpHandler;
Expand All @@ -47,7 +47,7 @@ use std::default::Default;
use std::env;
use std::ffi::OsString;
use std::fs;
use std::io::{self, Read, Write};
use std::io::{self, IsTerminal, Read, Write};
use std::panic::{self, catch_unwind};
use std::path::PathBuf;
use std::process::{self, Command, Stdio};
Expand Down Expand Up @@ -538,7 +538,7 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) {
}
text.push('\n');
}
if stdout_isatty() {
if io::stdout().is_terminal() {
show_content_with_pager(&text);
} else {
print!("{}", text);
Expand Down