Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphize cont #6

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
remove variable for ()
  • Loading branch information
lcnr committed Dec 8, 2021
commit 65e52eff6ccf0c2543ecdb6e427506489e9a4377
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ impl CrateInfo {
}

pub fn provide(providers: &mut Providers) {
providers.backend_optimization_level = |tcx, cratenum| {
providers.backend_optimization_level = |tcx, ()| {
let for_speed = match tcx.sess.opts.optimize {
// If globally no optimisation is done, #[optimize] has no effect.
//
Expand All @@ -893,7 +893,7 @@ pub fn provide(providers: &mut Providers) {
config::OptLevel::SizeMin => config::OptLevel::Default,
};

let (mono_items, _) = tcx.collect_and_partition_mono_items(cratenum);
let (mono_items, _) = tcx.collect_and_partition_mono_items(());
for did in mono_items.def_id_iter() {
let CodegenFnAttrs { optimize, .. } = tcx.codegen_fn_attrs(did);
match optimize {
Expand Down