diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 10:15:45 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 16:06:22 +1100 |
| commit | f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3 (patch) | |
| tree | 246774c222d64bdac2b129eed55c8f64f2cf4b66 /src/librustdoc/scrape_examples.rs | |
| parent | 4dc7fab56f224467439237dafb8b3211f1a0d165 (diff) | |
| download | rust-f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3.tar.gz rust-f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3.zip | |
Rename many `DiagCtxt` arguments.
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
| -rw-r--r-- | src/librustdoc/scrape_examples.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustdoc/scrape_examples.rs b/src/librustdoc/scrape_examples.rs index eba7af064be..a343d7afcee 100644 --- a/src/librustdoc/scrape_examples.rs +++ b/src/librustdoc/scrape_examples.rs @@ -40,7 +40,7 @@ pub(crate) struct ScrapeExamplesOptions { impl ScrapeExamplesOptions { pub(crate) fn new( matches: &getopts::Matches, - diag: &rustc_errors::DiagCtxt, + dcx: &rustc_errors::DiagCtxt, ) -> Result<Option<Self>, i32> { let output_path = matches.opt_str("scrape-examples-output-path"); let target_crates = matches.opt_strs("scrape-examples-target-crate"); @@ -52,11 +52,11 @@ impl ScrapeExamplesOptions { scrape_tests, })), (Some(_), false, _) | (None, true, _) => { - diag.err("must use --scrape-examples-output-path and --scrape-examples-target-crate together"); + dcx.err("must use --scrape-examples-output-path and --scrape-examples-target-crate together"); Err(1) } (None, false, true) => { - diag.err("must use --scrape-examples-output-path and --scrape-examples-target-crate with --scrape-tests"); + dcx.err("must use --scrape-examples-output-path and --scrape-examples-target-crate with --scrape-tests"); Err(1) } (None, false, false) => Ok(None), @@ -341,7 +341,7 @@ pub(crate) fn run( // options. pub(crate) fn load_call_locations( with_examples: Vec<String>, - diag: &rustc_errors::DiagCtxt, + dcx: &rustc_errors::DiagCtxt, ) -> Result<AllCallLocations, i32> { let inner = || { let mut all_calls: AllCallLocations = FxHashMap::default(); @@ -359,7 +359,7 @@ pub(crate) fn load_call_locations( }; inner().map_err(|e: String| { - diag.err(format!("failed to load examples: {e}")); + dcx.err(format!("failed to load examples: {e}")); 1 }) } |
