55//! This API is completely unstable and subject to change.
66
77#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
8+ #![ feature( is_terminal) ]
89#![ feature( once_cell) ]
910#![ recursion_limit = "256" ]
1011#![ allow( rustc:: potential_query_instability) ]
@@ -26,7 +27,6 @@ use rustc_feature::find_gated_cfg;
2627use rustc_interface:: util:: { self , collect_crate_types, get_codegen_backend} ;
2728use rustc_interface:: { interface, Queries } ;
2829use rustc_lint:: LintStore ;
29- use rustc_log:: stdout_isatty;
3030use rustc_metadata:: locator;
3131use rustc_save_analysis as save;
3232use rustc_save_analysis:: DumpHandler ;
@@ -47,7 +47,7 @@ use std::default::Default;
4747use std:: env;
4848use std:: ffi:: OsString ;
4949use std:: fs;
50- use std:: io:: { self , Read , Write } ;
50+ use std:: io:: { self , IsTerminal , Read , Write } ;
5151use std:: panic:: { self , catch_unwind} ;
5252use std:: path:: PathBuf ;
5353use std:: process:: { self , Command , Stdio } ;
@@ -538,7 +538,7 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) {
538538 }
539539 text. push ( '\n' ) ;
540540 }
541- if stdout_isatty ( ) {
541+ if io :: stdout ( ) . is_terminal ( ) {
542542 show_content_with_pager ( & text) ;
543543 } else {
544544 print ! ( "{}" , text) ;
0 commit comments