Remove redundant gated feature checking pass

This commit is contained in:
Jeffrey Seyfried 2016-04-09 00:16:57 +00:00
parent 417a6df9b0
commit 5eb775eedd

View file

@ -647,19 +647,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
krate
})?;
// Needs to go *after* expansion to be able to check the results
// of macro expansion.
time(time_passes, "complete gated feature checking 1", || {
sess.track_errors(|| {
let features = syntax::feature_gate::check_crate(sess.codemap(),
&sess.parse_sess.span_diagnostic,
&krate,
&attributes,
sess.opts.unstable_features);
*sess.features.borrow_mut() = features;
})
})?;
krate = time(time_passes, "maybe building test harness", || {
syntax::test::modify_for_testing(&sess.parse_sess, &sess.opts.cfg, krate, sess.diagnostic())
});
@ -676,10 +663,8 @@ pub fn phase_2_configure_and_expand(sess: &Session,
"checking for inline asm in case the target doesn't support it",
|| no_asm::check_crate(sess, &krate));
// One final feature gating of the true AST that gets compiled
// later, to make sure we've got everything (e.g. configuration
// can insert new attributes via `cfg_attr`)
time(time_passes, "complete gated feature checking 2", || {
// Needs to go *after* expansion to be able to check the results of macro expansion.
time(time_passes, "complete gated feature checking", || {
sess.track_errors(|| {
let features = syntax::feature_gate::check_crate(sess.codemap(),
&sess.parse_sess.span_diagnostic,