diff options
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 3a2550ae1f3..a46b0e51f75 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -382,12 +382,12 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se codegen_backend.init(&sess); - let cfg = parse_cfg(&sess.diagnostic(), config.crate_cfg); + let cfg = parse_cfg(&sess.dcx(), config.crate_cfg); let mut cfg = config::build_configuration(&sess, cfg); util::add_configuration(&mut cfg, &mut sess, &*codegen_backend); sess.parse_sess.config = cfg; - let mut check_cfg = parse_check_cfg(&sess.diagnostic(), config.crate_check_cfg); + let mut check_cfg = parse_check_cfg(&sess.dcx(), config.crate_check_cfg); check_cfg.fill_well_known(&sess.target); sess.parse_sess.check_config = check_cfg; diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 9b59ead0463..21beb90d73f 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -56,7 +56,7 @@ pub fn parse<'a>(sess: &'a Session) -> PResult<'a, ast::Crate> { } if let Some(ref s) = sess.opts.unstable_opts.show_span { - rustc_ast_passes::show_span::run(sess.diagnostic(), s, &krate); + rustc_ast_passes::show_span::run(sess.dcx(), s, &krate); } if sess.opts.unstable_opts.hir_stats { @@ -267,7 +267,7 @@ fn configure_and_expand( is_proc_macro_crate, has_proc_macro_decls, is_test_crate, - sess.diagnostic(), + sess.dcx(), ) }); @@ -526,7 +526,7 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P match result { Ok(_) => { if sess.opts.json_artifact_notifications { - sess.diagnostic().emit_artifact_notification(deps_filename, "dep-info"); + sess.dcx().emit_artifact_notification(deps_filename, "dep-info"); } } Err(error) => { diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index e9611c74a68..8a553b95e8e 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -228,7 +228,7 @@ impl<'tcx> Queries<'tcx> { // If we have any delayed bugs, for example because we created TyKind::Error earlier, // it's likely that codegen will only cause more ICEs, obscuring the original problem - self.compiler.sess.diagnostic().flush_delayed(); + self.compiler.sess.dcx().flush_delayed(); // Hook for UI tests. Self::check_for_rustc_errors_attr(tcx); diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index 076dd78b0e0..12547799db8 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -52,7 +52,7 @@ fn mk_session(matches: getopts::Matches) -> (Session, Cfg) { Arc::default(), Default::default(), ); - let cfg = parse_cfg(&sess.diagnostic(), matches.opt_strs("cfg")); + let cfg = parse_cfg(&sess.dcx(), matches.opt_strs("cfg")); (sess, cfg) } @@ -143,20 +143,20 @@ fn test_can_print_warnings() { rustc_span::create_default_session_globals_then(|| { let matches = optgroups().parse(&["-Awarnings".to_string()]).unwrap(); let (sess, _) = mk_session(matches); - assert!(!sess.diagnostic().can_emit_warnings()); + assert!(!sess.dcx().can_emit_warnings()); }); rustc_span::create_default_session_globals_then(|| { let matches = optgroups().parse(&["-Awarnings".to_string(), "-Dwarnings".to_string()]).unwrap(); let (sess, _) = mk_session(matches); - assert!(sess.diagnostic().can_emit_warnings()); + assert!(sess.dcx().can_emit_warnings()); }); rustc_span::create_default_session_globals_then(|| { let matches = optgroups().parse(&["-Adead_code".to_string()]).unwrap(); let (sess, _) = mk_session(matches); - assert!(sess.diagnostic().can_emit_warnings()); + assert!(sess.dcx().can_emit_warnings()); }); } |
