Skip to content

Commit

Permalink
Rollup merge of rust-lang#91368 - ecstatic-morse:mir-pass-reexport, r…
Browse files Browse the repository at this point in the history
…=cjgillot

Don't re-export `MirPass`

`rust-analyzer` wants to use the `rustc_const_eval` one by default, which is weird.

r? `@cjgillot`
  • Loading branch information
matthiaskrgr authored Nov 30, 2021
2 parents 5d4d3f2 + 188d670 commit 1a46a42
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_const_eval/src/transform/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
pub mod check_consts;
pub mod promote_consts;
pub mod validate;

pub use rustc_middle::mir::MirPass;
1 change: 0 additions & 1 deletion compiler/rustc_const_eval/src/transform/promote_consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use std::cell::Cell;
use std::{cmp, iter, mem};

use crate::transform::check_consts::{qualifs, ConstCx};
use crate::transform::MirPass;

/// A `MirPass` for promotion.
///
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_const_eval/src/transform/validate.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
//! Validates the MIR to ensure that invariants are upheld.
use super::MirPass;
use rustc_index::bit_set::BitSet;
use rustc_infer::infer::TyCtxtInferExt;
use rustc_middle::mir::interpret::Scalar;
use rustc_middle::mir::traversal;
use rustc_middle::mir::visit::{PlaceContext, Visitor};
use rustc_middle::mir::{
AggregateKind, BasicBlock, Body, BorrowKind, Local, Location, MirPhase, Operand, PlaceElem,
PlaceRef, ProjectionElem, Rvalue, SourceScope, Statement, StatementKind, Terminator,
AggregateKind, BasicBlock, Body, BorrowKind, Local, Location, MirPass, MirPhase, Operand,
PlaceElem, PlaceRef, ProjectionElem, Rvalue, SourceScope, Statement, StatementKind, Terminator,
TerminatorKind, START_BLOCK,
};
use rustc_middle::ty::fold::BottomUpFolder;
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
use rustc_index::vec::IndexVec;
use rustc_middle::mir::visit::Visitor as _;
use rustc_middle::mir::{dump_mir, traversal, Body, ConstQualifs, MirPhase, Promoted};
use rustc_middle::mir::{dump_mir, traversal, Body, ConstQualifs, MirPass, MirPhase, Promoted};
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::{self, TyCtxt, TypeFoldable};
use rustc_span::{Span, Symbol};
Expand Down Expand Up @@ -78,7 +78,6 @@ mod unreachable_prop;
use rustc_const_eval::transform::check_consts;
use rustc_const_eval::transform::promote_consts;
use rustc_const_eval::transform::validate;
pub use rustc_const_eval::transform::MirPass;
use rustc_mir_dataflow::rustc_peek;

pub fn provide(providers: &mut Providers) {
Expand Down

0 comments on commit 1a46a42

Please sign in to comment.