Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not track_errors in register_plugins
Browse files Browse the repository at this point in the history
estebank committed Mar 15, 2019
1 parent 4a90349 commit eaa69d5
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/librustc_interface/passes.rs
Original file line number Diff line number Diff line change
@@ -322,22 +322,20 @@ pub fn register_plugins<'a>(
..
} = registry;

sess.track_errors(|| {
let mut ls = sess.lint_store.borrow_mut();
for pass in early_lint_passes {
ls.register_early_pass(Some(sess), true, false, pass);
}
for pass in late_lint_passes {
ls.register_late_pass(Some(sess), true, pass);
}
let mut ls = sess.lint_store.borrow_mut();
for pass in early_lint_passes {
ls.register_early_pass(Some(sess), true, false, pass);
}
for pass in late_lint_passes {
ls.register_late_pass(Some(sess), true, pass);
}

for (name, (to, deprecated_name)) in lint_groups {
ls.register_group(Some(sess), true, name, deprecated_name, to);
}
for (name, (to, deprecated_name)) in lint_groups {
ls.register_group(Some(sess), true, name, deprecated_name, to);
}

*sess.plugin_llvm_passes.borrow_mut() = llvm_passes;
*sess.plugin_attributes.borrow_mut() = attributes.clone();
})?;
*sess.plugin_llvm_passes.borrow_mut() = llvm_passes;
*sess.plugin_attributes.borrow_mut() = attributes.clone();

Ok((krate, PluginInfo {
syntax_exts,

0 comments on commit eaa69d5

Please sign in to comment.