about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/examples
diff options
context:
space:
mode:
authorgftea <1705787+gftea@users.noreply.github.com>2023-01-14 21:34:23 +0100
committerGitHub <noreply@github.com>2023-01-15 05:34:23 +0900
commite04658acc1066f915430ea8558be3823b0113f73 (patch)
tree62fd29c940f94e6876f20dde7bfbc96c7c744fcf /src/doc/rustc-dev-guide/examples
parent8ec98956b5c0ddce8ad8ae504dd43f7f966d1b11 (diff)
fix examples for rustc 1.68.0-nightly (935dc0721 2022-12-19) (#1556) (#1557)
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Closes https://github.com/rust-lang/rustc-dev-guide/issues/1556
Diffstat (limited to 'src/doc/rustc-dev-guide/examples')
-rw-r--r--src/doc/rustc-dev-guide/examples/rustc-driver-example.rs3
-rw-r--r--src/doc/rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs6
-rw-r--r--src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs3
3 files changed, 3 insertions, 9 deletions
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs
index 4203fe96a0b..8d8b40cd7ea 100644
--- a/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs
+++ b/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs
@@ -3,7 +3,7 @@
 // NOTE: For the example to compile, you will need to first run the following:
 //   rustup component add rustc-dev llvm-tools-preview
 
-// version: 1.62.0-nightly (7c4b47696 2022-04-30)
+// version: rustc 1.68.0-nightly (935dc0721 2022-12-19)
 
 extern crate rustc_error_codes;
 extern crate rustc_errors;
@@ -50,7 +50,6 @@ fn main() {
         output_dir: None,  // Option<PathBuf>
         output_file: None, // Option<PathBuf>
         file_loader: None, // Option<Box<dyn FileLoader + Send + Sync>>
-        diagnostic_output: rustc_session::DiagnosticOutput::Default,
         lint_caps: FxHashMap::default(), // FxHashMap<lint::LintId, lint::Level>
         // This is a callback from the driver that is called when [`ParseSess`] is created.
         parse_sess_created: None, //Option<Box<dyn FnOnce(&mut ParseSess) + Send>>
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs
index 1d3a4034e4d..49ee9ff44ce 100644
--- a/src/doc/rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs
+++ b/src/doc/rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs
@@ -3,7 +3,7 @@
 // NOTE: For the example to compile, you will need to first run the following:
 //   rustup component add rustc-dev llvm-tools-preview
 
-// version: 1.62.0-nightly (7c4b47696 2022-04-30)
+// version: rustc 1.68.0-nightly (935dc0721 2022-12-19)
 
 extern crate rustc_error_codes;
 extern crate rustc_errors;
@@ -65,10 +65,6 @@ fn main() {
 "
             .into(),
         },
-        // Redirect the diagnostic output of the compiler to a buffer.
-        diagnostic_output: rustc_session::DiagnosticOutput::Raw(Box::from(DiagnosticSink(
-            buffer.clone(),
-        ))),
         crate_cfg: rustc_hash::FxHashSet::default(),
         crate_check_cfg: CheckCfg::default(),
         input_path: None,
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs
index 231994a97d1..07b09e9df76 100644
--- a/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs
+++ b/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs
@@ -3,7 +3,7 @@
 // NOTE: For the example to compile, you will need to first run the following:
 //   rustup component add rustc-dev llvm-tools-preview
 
-// version: 1.62.0-nightly (7c4b47696 2022-04-30)
+// version: rustc 1.68.0-nightly (935dc0721 2022-12-19)
 
 extern crate rustc_ast_pretty;
 extern crate rustc_error_codes;
@@ -43,7 +43,6 @@ fn main() {
 "#
             .to_string(),
         },
-        diagnostic_output: rustc_session::DiagnosticOutput::Default,
         crate_cfg: rustc_hash::FxHashSet::default(),
         crate_check_cfg: CheckCfg::default(),
         input_path: None,