Skip to content

Commit af3c8b2

Browse files
committed
Auto merge of #101841 - nnethercote:rm-save-analysis, r=Mark-Simulacrum
Remove save-analysis. Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. Closes #43606
2 parents 4b34c7b + 22a5125 commit af3c8b2

File tree

82 files changed

+50
-5215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+50
-5215
lines changed

Cargo.lock

-41
Original file line numberDiff line numberDiff line change
@@ -3495,25 +3495,6 @@ dependencies = [
34953495
"serde_json",
34963496
]
34973497

3498-
[[package]]
3499-
name = "rls-data"
3500-
version = "0.19.1"
3501-
source = "registry+https://github.com/rust-lang/crates.io-index"
3502-
checksum = "a58135eb039f3a3279a33779192f0ee78b56f57ae636e25cec83530e41debb99"
3503-
dependencies = [
3504-
"rls-span",
3505-
"serde",
3506-
]
3507-
3508-
[[package]]
3509-
name = "rls-span"
3510-
version = "0.5.3"
3511-
source = "registry+https://github.com/rust-lang/crates.io-index"
3512-
checksum = "f0eea58478fc06e15f71b03236612173a1b81e9770314edecfa664375e3e4c86"
3513-
dependencies = [
3514-
"serde",
3515-
]
3516-
35173498
[[package]]
35183499
name = "rust-demangler"
35193500
version = "0.0.1"
@@ -3965,7 +3946,6 @@ dependencies = [
39653946
"rustc_middle",
39663947
"rustc_parse",
39673948
"rustc_plugin_impl",
3968-
"rustc_save_analysis",
39693949
"rustc_session",
39703950
"rustc_span",
39713951
"rustc_target",
@@ -4625,27 +4605,6 @@ dependencies = [
46254605
"tracing",
46264606
]
46274607

4628-
[[package]]
4629-
name = "rustc_save_analysis"
4630-
version = "0.0.0"
4631-
dependencies = [
4632-
"rls-data",
4633-
"rls-span",
4634-
"rustc_ast",
4635-
"rustc_ast_pretty",
4636-
"rustc_data_structures",
4637-
"rustc_errors",
4638-
"rustc_hir",
4639-
"rustc_hir_pretty",
4640-
"rustc_lexer",
4641-
"rustc_macros",
4642-
"rustc_middle",
4643-
"rustc_session",
4644-
"rustc_span",
4645-
"serde_json",
4646-
"tracing",
4647-
]
4648-
46494608
[[package]]
46504609
name = "rustc_serialize"
46514610
version = "0.0.0"

compiler/rustc_driver_impl/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rustc_macros = { path = "../rustc_macros" }
2222
rustc_metadata = { path = "../rustc_metadata" }
2323
rustc_parse = { path = "../rustc_parse" }
2424
rustc_plugin_impl = { path = "../rustc_plugin_impl" }
25-
rustc_save_analysis = { path = "../rustc_save_analysis" }
2625
rustc_codegen_ssa = { path = "../rustc_codegen_ssa" }
2726
rustc_session = { path = "../rustc_session" }
2827
rustc_error_codes = { path = "../rustc_error_codes" }

compiler/rustc_driver_impl/src/lib.rs

+1-19
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ use rustc_data_structures::sync::SeqCst;
2525
use rustc_errors::registry::{InvalidErrorCode, Registry};
2626
use rustc_errors::{ErrorGuaranteed, PResult, TerminalUrl};
2727
use rustc_feature::find_gated_cfg;
28-
use rustc_hir::def_id::LOCAL_CRATE;
2928
use rustc_interface::util::{self, collect_crate_types, get_codegen_backend};
3029
use rustc_interface::{interface, Queries};
3130
use rustc_lint::LintStore;
3231
use rustc_metadata::locator;
33-
use rustc_save_analysis as save;
34-
use rustc_save_analysis::DumpHandler;
3532
use rustc_session::config::{nightly_options, CG_OPTIONS, Z_OPTIONS};
3633
use rustc_session::config::{ErrorOutputType, Input, OutputType, PrintRequest, TrimmedDefPaths};
3734
use rustc_session::cstore::MetadataLoader;
@@ -343,22 +340,7 @@ fn run_compiler(
343340
return early_exit();
344341
}
345342

346-
queries.global_ctxt()?.enter(|tcx| {
347-
let result = tcx.analysis(());
348-
if sess.opts.unstable_opts.save_analysis {
349-
let crate_name = tcx.crate_name(LOCAL_CRATE);
350-
sess.time("save_analysis", || {
351-
save::process_crate(
352-
tcx,
353-
crate_name,
354-
&sess.io.input,
355-
None,
356-
DumpHandler::new(sess.io.output_dir.as_deref(), crate_name),
357-
)
358-
});
359-
}
360-
result
361-
})?;
343+
queries.global_ctxt()?.enter(|tcx| tcx.analysis(()))?;
362344

363345
if callbacks.after_analysis(compiler, queries) == Compilation::Stop {
364346
return early_exit();

compiler/rustc_error_messages/locales/en-US/save_analysis.ftl

-1
This file was deleted.

compiler/rustc_error_messages/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ fluent_messages! {
6767
privacy => "../locales/en-US/privacy.ftl",
6868
query_system => "../locales/en-US/query_system.ftl",
6969
resolve => "../locales/en-US/resolve.ftl",
70-
save_analysis => "../locales/en-US/save_analysis.ftl",
7170
session => "../locales/en-US/session.ftl",
7271
symbol_mangling => "../locales/en-US/symbol_mangling.ftl",
7372
trait_selection => "../locales/en-US/trait_selection.ftl",

compiler/rustc_interface/src/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,6 @@ fn test_unstable_options_tracking_hash() {
691691
untracked!(proc_macro_execution_strategy, ProcMacroExecutionStrategy::CrossThread);
692692
untracked!(profile_closures, true);
693693
untracked!(query_dep_graph, true);
694-
untracked!(save_analysis, true);
695694
untracked!(self_profile, SwitchWithOptPath::Enabled(None));
696695
untracked!(self_profile_events, Some(vec![String::new()]));
697696
untracked!(span_debug, true);

compiler/rustc_save_analysis/Cargo.toml

-21
This file was deleted.

0 commit comments

Comments
 (0)