Use macros for option tests.

This commit is contained in:
Nicholas Nethercote 2020-04-21 15:55:02 +10:00
parent 14ea491744
commit 6e7ba26bbd

View File

@ -375,152 +375,65 @@ fn test_codegen_options_tracking_hash() {
let reference = Options::default(); let reference = Options::default();
let mut opts = Options::default(); let mut opts = Options::default();
macro_rules! untracked {
($name: ident, $non_default_value: expr) => {
opts.cg.$name = $non_default_value;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
};
}
// Make sure that changing an [UNTRACKED] option leaves the hash unchanged. // Make sure that changing an [UNTRACKED] option leaves the hash unchanged.
// This list is in alphabetical order. // This list is in alphabetical order.
untracked!(ar, String::from("abc"));
opts.cg.ar = String::from("abc"); untracked!(codegen_units, Some(42));
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(default_linker_libraries, true);
untracked!(extra_filename, String::from("extra-filename"));
opts.cg.codegen_units = Some(42); untracked!(incremental, Some(String::from("abc")));
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.default_linker_libraries = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.extra_filename = String::from("extra-filename");
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.incremental = Some(String::from("abc"));
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
// `link_arg` is omitted because it just forwards to `link_args`. // `link_arg` is omitted because it just forwards to `link_args`.
untracked!(link_args, vec![String::from("abc"), String::from("def")]);
untracked!(link_dead_code, true);
untracked!(linker, Some(PathBuf::from("linker")));
untracked!(linker_flavor, Some(LinkerFlavor::Gcc));
untracked!(no_stack_check, true);
untracked!(remark, Passes::Some(vec![String::from("pass1"), String::from("pass2")]));
untracked!(rpath, true);
untracked!(save_temps, true);
opts.cg.link_args = vec![String::from("abc"), String::from("def")]; macro_rules! tracked {
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); ($name: ident, $non_default_value: expr) => {
opts = reference.clone();
opts.cg.link_dead_code = true; opts.cg.$name = $non_default_value;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
};
opts.cg.linker = Some(PathBuf::from("linker")); }
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.linker_flavor = Some(LinkerFlavor::Gcc);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.no_stack_check = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.remark = Passes::Some(vec![String::from("pass1"), String::from("pass2")]);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.rpath = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.cg.save_temps = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
// Make sure that changing a [TRACKED] option changes the hash. // Make sure that changing a [TRACKED] option changes the hash.
// This list is in alphabetical order. // This list is in alphabetical order.
tracked!(bitcode_in_rlib, false);
opts = reference.clone(); tracked!(code_model, Some(String::from("code model")));
opts.cg.bitcode_in_rlib = false; tracked!(debug_assertions, Some(true));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(debuginfo, 0xdeadbeef);
tracked!(force_frame_pointers, Some(false));
opts = reference.clone(); tracked!(inline_threshold, Some(0xf007ba11));
opts.cg.code_model = Some(String::from("code model")); tracked!(linker_plugin_lto, LinkerPluginLto::LinkerPluginAuto);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(llvm_args, vec![String::from("1"), String::from("2")]);
tracked!(lto, LtoCli::Fat);
opts = reference.clone(); tracked!(metadata, vec![String::from("A"), String::from("B")]);
opts.cg.debug_assertions = Some(true); tracked!(no_prepopulate_passes, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(no_redzone, Some(true));
tracked!(no_vectorize_loops, true);
opts = reference.clone(); tracked!(no_vectorize_slp, true);
opts.cg.debuginfo = 0xdeadbeef; tracked!(opt_level, "3".to_string());
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(overflow_checks, Some(true));
tracked!(panic, Some(PanicStrategy::Abort));
opts = reference.clone(); tracked!(passes, vec![String::from("1"), String::from("2")]);
opts.cg.force_frame_pointers = Some(false); tracked!(prefer_dynamic, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(profile_generate, SwitchWithOptPath::Enabled(None));
tracked!(profile_use, Some(PathBuf::from("abc")));
opts = reference.clone(); tracked!(relocation_model, Some(String::from("relocation model")));
opts.cg.inline_threshold = Some(0xf007ba11); tracked!(soft_float, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(target_cpu, Some(String::from("abc")));
tracked!(target_feature, String::from("all the features, all of them"));
opts = reference.clone();
opts.cg.linker_plugin_lto = LinkerPluginLto::LinkerPluginAuto;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.llvm_args = vec![String::from("1"), String::from("2")];
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.lto = LtoCli::Fat;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.metadata = vec![String::from("A"), String::from("B")];
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.no_prepopulate_passes = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.no_redzone = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.no_vectorize_loops = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.no_vectorize_slp = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.opt_level = "3".to_string();
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.overflow_checks = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.panic = Some(PanicStrategy::Abort);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.passes = vec![String::from("1"), String::from("2")];
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.prefer_dynamic = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.profile_generate = SwitchWithOptPath::Enabled(None);
assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.profile_use = Some(PathBuf::from("abc"));
assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.relocation_model = Some(String::from("relocation model"));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.soft_float = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.target_cpu = Some(String::from("abc"));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.cg.target_feature = String::from("all the features, all of them");
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
} }
#[test] #[test]
@ -528,392 +441,136 @@ fn test_debugging_options_tracking_hash() {
let reference = Options::default(); let reference = Options::default();
let mut opts = Options::default(); let mut opts = Options::default();
macro_rules! untracked {
($name: ident, $non_default_value: expr) => {
opts.debugging_opts.$name = $non_default_value;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
};
}
// Make sure that changing an [UNTRACKED] option leaves the hash unchanged. // Make sure that changing an [UNTRACKED] option leaves the hash unchanged.
// This list is in alphabetical order. // This list is in alphabetical order.
untracked!(ast_json, true);
opts.debugging_opts.ast_json = true; untracked!(ast_json_noexpand, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(borrowck, String::from("other"));
untracked!(borrowck_stats, true);
opts.debugging_opts.ast_json_noexpand = true; untracked!(control_flow_guard, CFGuard::Checks);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(deduplicate_diagnostics, true);
untracked!(dep_tasks, true);
opts.debugging_opts.borrowck = String::from("other"); untracked!(dont_buffer_diagnostics, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(dump_dep_graph, true);
untracked!(dump_mir, Some(String::from("abc")));
opts.debugging_opts.borrowck_stats = true; untracked!(dump_mir_dataflow, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(dump_mir_dir, String::from("abc"));
untracked!(dump_mir_exclude_pass_number, true);
opts.debugging_opts.control_flow_guard = CFGuard::Checks; untracked!(dump_mir_graphviz, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(emit_stack_sizes, true);
untracked!(hir_stats, true);
opts.debugging_opts.deduplicate_diagnostics = true; untracked!(identify_regions, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(incremental_ignore_spans, true);
untracked!(incremental_info, true);
opts.debugging_opts.dep_tasks = true; untracked!(incremental_verify_ich, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(input_stats, true);
untracked!(keep_hygiene_data, true);
opts.debugging_opts.dont_buffer_diagnostics = true; untracked!(link_native_libraries, false);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(llvm_time_trace, true);
untracked!(ls, true);
opts.debugging_opts.dump_dep_graph = true; untracked!(macro_backtrace, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(meta_stats, true);
untracked!(nll_facts, true);
opts.debugging_opts.dump_mir = Some(String::from("abc")); untracked!(no_analysis, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(no_interleave_lints, true);
untracked!(no_leak_check, true);
opts.debugging_opts.dump_mir_dataflow = true; untracked!(no_parallel_llvm, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); untracked!(parse_only, true);
untracked!(perf_stats, true);
opts.debugging_opts.dump_mir_dir = String::from("abc"); untracked!(polonius, true);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.dump_mir_exclude_pass_number = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.dump_mir_graphviz = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.emit_stack_sizes = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.hir_stats = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.identify_regions = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.incremental_ignore_spans = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.incremental_info = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.incremental_verify_ich = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.input_stats = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.keep_hygiene_data = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.link_native_libraries = false;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.llvm_time_trace = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.ls = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.macro_backtrace = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.meta_stats = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.nll_facts = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.no_analysis = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.no_interleave_lints = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.no_leak_check = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.no_parallel_llvm = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.parse_only = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.perf_stats = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.polonius = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
// `pre_link_arg` is omitted because it just forwards to `pre_link_args`. // `pre_link_arg` is omitted because it just forwards to `pre_link_args`.
untracked!(pre_link_args, vec![String::from("abc"), String::from("def")]);
untracked!(print_link_args, true);
untracked!(print_llvm_passes, true);
untracked!(print_mono_items, Some(String::from("abc")));
untracked!(print_region_graph, true);
untracked!(print_type_sizes, true);
untracked!(query_dep_graph, true);
untracked!(query_stats, true);
untracked!(save_analysis, true);
untracked!(self_profile, SwitchWithOptPath::Enabled(None));
untracked!(self_profile_events, Some(vec![String::new()]));
untracked!(span_free_formats, true);
untracked!(terminal_width, Some(80));
untracked!(threads, 99);
untracked!(time, true);
untracked!(time_llvm_passes, true);
untracked!(time_passes, true);
untracked!(trace_macros, true);
untracked!(ui_testing, true);
untracked!(unpretty, Some("expanded".to_string()));
untracked!(unstable_options, true);
untracked!(verbose, true);
opts.debugging_opts.pre_link_args = vec![String::from("abc"), String::from("def")]; macro_rules! tracked {
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); ($name: ident, $non_default_value: expr) => {
opts = reference.clone();
opts.debugging_opts.print_link_args = true; opts.debugging_opts.$name = $non_default_value;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
};
opts.debugging_opts.print_llvm_passes = true; }
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.print_mono_items = Some(String::from("abc"));
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.print_region_graph = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.print_type_sizes = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.query_dep_graph = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.query_stats = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.save_analysis = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.self_profile = SwitchWithOptPath::Enabled(None);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.self_profile_events = Some(vec![String::new()]);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.span_free_formats = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.terminal_width = Some(80);
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.threads = 99;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.time = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.time_llvm_passes = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.time_passes = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.trace_macros = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.ui_testing = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.unpretty = Some("expanded".to_string());
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.unstable_options = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.verbose = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
// Make sure that changing a [TRACKED] option changes the hash. // Make sure that changing a [TRACKED] option changes the hash.
// This list is in alphabetical order. // This list is in alphabetical order.
tracked!(allow_features, Some(vec![String::from("lang_items")]));
opts = reference.clone(); tracked!(always_encode_mir, true);
opts.debugging_opts.allow_features = Some(vec![String::from("lang_items")]); tracked!(asm_comments, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(binary_dep_depinfo, true);
tracked!(codegen_backend, Some("abc".to_string()));
opts = reference.clone(); tracked!(crate_attr, vec!["abc".to_string()]);
opts.debugging_opts.always_encode_mir = true; tracked!(debug_macros, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(dep_info_omit_d_target, true);
tracked!(dual_proc_macros, true);
opts = reference.clone(); tracked!(embed_bitcode, true);
opts.debugging_opts.asm_comments = true; tracked!(fewer_names, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(force_overflow_checks, Some(true));
tracked!(force_unstable_if_unmarked, true);
opts = reference.clone(); tracked!(fuel, Some(("abc".to_string(), 99)));
opts.debugging_opts.binary_dep_depinfo = true; tracked!(human_readable_cgu_names, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(inline_in_all_cgus, Some(true));
tracked!(insert_sideeffect, true);
opts = reference.clone(); tracked!(instrument_mcount, true);
opts.debugging_opts.codegen_backend = Some("abc".to_string()); tracked!(link_only, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(merge_functions, Some(MergeFunctions::Disabled));
tracked!(mir_emit_retag, true);
opts = reference.clone(); tracked!(mir_opt_level, 3);
opts.debugging_opts.crate_attr = vec!["abc".to_string()]; tracked!(mutable_noalias, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(new_llvm_pass_manager, true);
tracked!(no_codegen, true);
opts = reference.clone(); tracked!(no_generate_arange_section, true);
opts.debugging_opts.debug_macros = true; tracked!(no_landing_pads, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(no_link, true);
tracked!(no_profiler_runtime, true);
opts = reference.clone(); tracked!(osx_rpath_install_name, true);
opts.debugging_opts.dep_info_omit_d_target = true; tracked!(panic_abort_tests, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(plt, Some(true));
tracked!(print_fuel, Some("abc".to_string()));
opts = reference.clone(); tracked!(profile, true);
opts.debugging_opts.dual_proc_macros = true; tracked!(relro_level, Some(RelroLevel::Full));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(report_delayed_bugs, true);
tracked!(run_dsymutil, false);
opts = reference.clone(); tracked!(sanitizer, Some(Sanitizer::Address));
opts.debugging_opts.embed_bitcode = true; tracked!(sanitizer_memory_track_origins, 2);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(sanitizer_recover, vec![Sanitizer::Address]);
tracked!(saturating_float_casts, true);
opts = reference.clone(); tracked!(share_generics, Some(true));
opts.debugging_opts.fewer_names = true; tracked!(show_span, Some(String::from("abc")));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(src_hash_algorithm, Some(SourceFileHashAlgorithm::Sha1));
tracked!(strip_debuginfo_if_disabled, true);
opts = reference.clone(); tracked!(symbol_mangling_version, SymbolManglingVersion::V0);
opts.debugging_opts.force_overflow_checks = Some(true); tracked!(teach, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(thinlto, Some(true));
tracked!(tls_model, Some(String::from("tls model")));
opts = reference.clone(); tracked!(treat_err_as_bug, Some(1));
opts.debugging_opts.force_unstable_if_unmarked = true; tracked!(unleash_the_miri_inside_of_you, true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); tracked!(verify_llvm_ir, true);
opts = reference.clone();
opts.debugging_opts.fuel = Some(("abc".to_string(), 99));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.human_readable_cgu_names = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.inline_in_all_cgus = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.insert_sideeffect = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.instrument_mcount = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.link_only = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.merge_functions = Some(MergeFunctions::Disabled);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.mir_emit_retag = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.mir_opt_level = 3;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.mutable_noalias = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.new_llvm_pass_manager = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.no_codegen = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.no_generate_arange_section = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.no_landing_pads = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.no_link = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.no_profiler_runtime = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.osx_rpath_install_name = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.panic_abort_tests = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.plt = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.print_fuel = Some("abc".to_string());
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.profile = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.relro_level = Some(RelroLevel::Full);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.report_delayed_bugs = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.run_dsymutil = false;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.sanitizer = Some(Sanitizer::Address);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.sanitizer_memory_track_origins = 2;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.sanitizer_recover = vec![Sanitizer::Address];
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.saturating_float_casts = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.share_generics = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.show_span = Some(String::from("abc"));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.src_hash_algorithm = Some(SourceFileHashAlgorithm::Sha1);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.strip_debuginfo_if_disabled = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.symbol_mangling_version = SymbolManglingVersion::V0;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.teach = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.thinlto = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.tls_model = Some(String::from("tls model"));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.treat_err_as_bug = Some(1);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.unleash_the_miri_inside_of_you = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
opts.debugging_opts.verify_llvm_ir = true;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
} }
#[test] #[test]