1
Fork 0

Made a submodule for fn_ctxt

This commit is contained in:
Nicholas-Baron 2020-10-12 11:57:29 -07:00
parent 84878794ed
commit ce7c73c5a5
5 changed files with 69 additions and 58 deletions

View file

@ -1,9 +1,9 @@
use super::callee::{self, DeferredCallResolution};
use super::method::{self, MethodCallee, SelfSource};
use super::{BreakableCtxt, Diverges, Expectation, FallbackMode, FnCtxt, LocalTy};
use crate::astconv::{ use crate::astconv::{
AstConv, ExplicitLateBound, GenericArgCountMismatch, GenericArgCountResult, PathSeg, AstConv, ExplicitLateBound, GenericArgCountMismatch, GenericArgCountResult, PathSeg,
}; };
use crate::check::callee::{self, DeferredCallResolution};
use crate::check::method::{self, MethodCallee, SelfSource};
use crate::check::{BreakableCtxt, Diverges, Expectation, FallbackMode, FnCtxt, LocalTy};
use rustc_data_structures::captures::Captures; use rustc_data_structures::captures::Captures;
use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::fx::FxHashSet;
@ -41,7 +41,7 @@ use std::slice;
impl<'a, 'tcx> FnCtxt<'a, 'tcx> { impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Produces warning on the given node, if the current point in the /// Produces warning on the given node, if the current point in the
/// function is unreachable, and there hasn't been another warning. /// function is unreachable, and there hasn't been another warning.
pub(super) fn warn_if_unreachable(&self, id: hir::HirId, span: Span, kind: &str) { pub(in super::super) fn warn_if_unreachable(&self, id: hir::HirId, span: Span, kind: &str) {
// FIXME: Combine these two 'if' expressions into one once // FIXME: Combine these two 'if' expressions into one once
// let chains are implemented // let chains are implemented
if let Diverges::Always { span: orig_span, custom_note } = self.diverges.get() { if let Diverges::Always { span: orig_span, custom_note } = self.diverges.get() {
@ -75,7 +75,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// version (resolve_vars_if_possible), this version will /// version (resolve_vars_if_possible), this version will
/// also select obligations if it seems useful, in an effort /// also select obligations if it seems useful, in an effort
/// to get more type information. /// to get more type information.
pub(super) fn resolve_vars_with_obligations(&self, mut ty: Ty<'tcx>) -> Ty<'tcx> { pub(in super::super) fn resolve_vars_with_obligations(&self, mut ty: Ty<'tcx>) -> Ty<'tcx> {
debug!("resolve_vars_with_obligations(ty={:?})", ty); debug!("resolve_vars_with_obligations(ty={:?})", ty);
// No Infer()? Nothing needs doing. // No Infer()? Nothing needs doing.
@ -102,7 +102,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
ty ty
} }
pub(super) fn record_deferred_call_resolution( pub(in super::super) fn record_deferred_call_resolution(
&self, &self,
closure_def_id: DefId, closure_def_id: DefId,
r: DeferredCallResolution<'tcx>, r: DeferredCallResolution<'tcx>,
@ -111,7 +111,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
deferred_call_resolutions.entry(closure_def_id).or_default().push(r); deferred_call_resolutions.entry(closure_def_id).or_default().push(r);
} }
pub(super) fn remove_deferred_call_resolutions( pub(in super::super) fn remove_deferred_call_resolutions(
&self, &self,
closure_def_id: DefId, closure_def_id: DefId,
) -> Vec<DeferredCallResolution<'tcx>> { ) -> Vec<DeferredCallResolution<'tcx>> {
@ -149,7 +149,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
self.typeck_results.borrow_mut().field_indices_mut().insert(hir_id, index); self.typeck_results.borrow_mut().field_indices_mut().insert(hir_id, index);
} }
pub(super) fn write_resolution( pub(in super::super) fn write_resolution(
&self, &self,
hir_id: hir::HirId, hir_id: hir::HirId,
r: Result<(DefKind, DefId), ErrorReported>, r: Result<(DefKind, DefId), ErrorReported>,
@ -335,7 +335,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// As `instantiate_type_scheme`, but for the bounds found in a /// As `instantiate_type_scheme`, but for the bounds found in a
/// generic type scheme. /// generic type scheme.
pub(super) fn instantiate_bounds( pub(in super::super) fn instantiate_bounds(
&self, &self,
span: Span, span: Span,
def_id: DefId, def_id: DefId,
@ -355,7 +355,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Replaces the opaque types from the given value with type variables, /// Replaces the opaque types from the given value with type variables,
/// and records the `OpaqueTypeMap` for later use during writeback. See /// and records the `OpaqueTypeMap` for later use during writeback. See
/// `InferCtxt::instantiate_opaque_types` for more details. /// `InferCtxt::instantiate_opaque_types` for more details.
pub(super) fn instantiate_opaque_types_from_value<T: TypeFoldable<'tcx>>( pub(in super::super) fn instantiate_opaque_types_from_value<T: TypeFoldable<'tcx>>(
&self, &self,
parent_id: hir::HirId, parent_id: hir::HirId,
value: &T, value: &T,
@ -386,14 +386,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
value value
} }
pub(super) fn normalize_associated_types_in<T>(&self, span: Span, value: &T) -> T pub(in super::super) fn normalize_associated_types_in<T>(&self, span: Span, value: &T) -> T
where where
T: TypeFoldable<'tcx>, T: TypeFoldable<'tcx>,
{ {
self.inh.normalize_associated_types_in(span, self.body_id, self.param_env, value) self.inh.normalize_associated_types_in(span, self.body_id, self.param_env, value)
} }
pub(super) fn normalize_associated_types_in_as_infer_ok<T>( pub(in super::super) fn normalize_associated_types_in_as_infer_ok<T>(
&self, &self,
span: Span, span: Span,
value: &T, value: &T,
@ -600,11 +600,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
self.normalize_associated_types_in(span, &field.ty(self.tcx, substs)) self.normalize_associated_types_in(span, &field.ty(self.tcx, substs))
} }
pub(super) fn resolve_generator_interiors(&self, def_id: DefId) { pub(in super::super) fn resolve_generator_interiors(&self, def_id: DefId) {
let mut generators = self.deferred_generator_interiors.borrow_mut(); let mut generators = self.deferred_generator_interiors.borrow_mut();
for (body_id, interior, kind) in generators.drain(..) { for (body_id, interior, kind) in generators.drain(..) {
self.select_obligations_where_possible(false, |_| {}); self.select_obligations_where_possible(false, |_| {});
super::generator_interior::resolve_interior(self, def_id, body_id, interior, kind); crate::check::generator_interior::resolve_interior(
self, def_id, body_id, interior, kind,
);
} }
} }
@ -620,7 +622,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Fallback becomes very dubious if we have encountered type-checking errors. // Fallback becomes very dubious if we have encountered type-checking errors.
// In that case, fallback to Error. // In that case, fallback to Error.
// The return value indicates whether fallback has occurred. // The return value indicates whether fallback has occurred.
pub(super) fn fallback_if_possible(&self, ty: Ty<'tcx>, mode: FallbackMode) -> bool { pub(in super::super) fn fallback_if_possible(&self, ty: Ty<'tcx>, mode: FallbackMode) -> bool {
use rustc_middle::ty::error::UnconstrainedNumeric::Neither; use rustc_middle::ty::error::UnconstrainedNumeric::Neither;
use rustc_middle::ty::error::UnconstrainedNumeric::{UnconstrainedFloat, UnconstrainedInt}; use rustc_middle::ty::error::UnconstrainedNumeric::{UnconstrainedFloat, UnconstrainedInt};
@ -685,7 +687,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
true true
} }
pub(super) fn select_all_obligations_or_error(&self) { pub(in super::super) fn select_all_obligations_or_error(&self) {
debug!("select_all_obligations_or_error"); debug!("select_all_obligations_or_error");
if let Err(errors) = self.fulfillment_cx.borrow_mut().select_all_or_error(&self) { if let Err(errors) = self.fulfillment_cx.borrow_mut().select_all_or_error(&self) {
self.report_fulfillment_errors(&errors, self.inh.body_id, false); self.report_fulfillment_errors(&errors, self.inh.body_id, false);
@ -693,7 +695,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
/// Select as many obligations as we can at present. /// Select as many obligations as we can at present.
pub(super) fn select_obligations_where_possible( pub(in super::super) fn select_obligations_where_possible(
&self, &self,
fallback_has_occurred: bool, fallback_has_occurred: bool,
mutate_fullfillment_errors: impl Fn(&mut Vec<traits::FulfillmentError<'tcx>>), mutate_fullfillment_errors: impl Fn(&mut Vec<traits::FulfillmentError<'tcx>>),
@ -709,7 +711,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// returns a type of `&T`, but the actual type we assign to the /// returns a type of `&T`, but the actual type we assign to the
/// *expression* is `T`. So this function just peels off the return /// *expression* is `T`. So this function just peels off the return
/// type by one layer to yield `T`. /// type by one layer to yield `T`.
pub(super) fn make_overloaded_place_return_type( pub(in super::super) fn make_overloaded_place_return_type(
&self, &self,
method: MethodCallee<'tcx>, method: MethodCallee<'tcx>,
) -> ty::TypeAndMut<'tcx> { ) -> ty::TypeAndMut<'tcx> {
@ -742,7 +744,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
} }
pub(super) fn obligations_for_self_ty<'b>( pub(in super::super) fn obligations_for_self_ty<'b>(
&'b self, &'b self,
self_ty: ty::TyVid, self_ty: ty::TyVid,
) -> impl Iterator<Item = (ty::PolyTraitRef<'tcx>, traits::PredicateObligation<'tcx>)> ) -> impl Iterator<Item = (ty::PolyTraitRef<'tcx>, traits::PredicateObligation<'tcx>)>
@ -792,18 +794,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
.filter(move |(tr, _)| self.self_type_matches_expected_vid(*tr, ty_var_root)) .filter(move |(tr, _)| self.self_type_matches_expected_vid(*tr, ty_var_root))
} }
pub(super) fn type_var_is_sized(&self, self_ty: ty::TyVid) -> bool { pub(in super::super) fn type_var_is_sized(&self, self_ty: ty::TyVid) -> bool {
self.obligations_for_self_ty(self_ty) self.obligations_for_self_ty(self_ty)
.any(|(tr, _)| Some(tr.def_id()) == self.tcx.lang_items().sized_trait()) .any(|(tr, _)| Some(tr.def_id()) == self.tcx.lang_items().sized_trait())
} }
pub(super) fn err_args(&self, len: usize) -> Vec<Ty<'tcx>> { pub(in super::super) fn err_args(&self, len: usize) -> Vec<Ty<'tcx>> {
vec![self.tcx.ty_error(); len] vec![self.tcx.ty_error(); len]
} }
/// Unifies the output type with the expected type early, for more coercions /// Unifies the output type with the expected type early, for more coercions
/// and forward type information on the input expressions. /// and forward type information on the input expressions.
pub(super) fn expected_inputs_for_expected_output( pub(in super::super) fn expected_inputs_for_expected_output(
&self, &self,
call_span: Span, call_span: Span,
expected_ret: Expectation<'tcx>, expected_ret: Expectation<'tcx>,
@ -856,7 +858,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
expect_args expect_args
} }
pub(super) fn resolve_lang_item_path( pub(in super::super) fn resolve_lang_item_path(
&self, &self,
lang_item: hir::LangItem, lang_item: hir::LangItem,
span: Span, span: Span,
@ -937,7 +939,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
/// Given a function `Node`, return its `FnDecl` if it exists, or `None` otherwise. /// Given a function `Node`, return its `FnDecl` if it exists, or `None` otherwise.
pub(super) fn get_node_fn_decl( pub(in super::super) fn get_node_fn_decl(
&self, &self,
node: Node<'tcx>, node: Node<'tcx>,
) -> Option<(&'tcx hir::FnDecl<'tcx>, Ident, bool)> { ) -> Option<(&'tcx hir::FnDecl<'tcx>, Ident, bool)> {
@ -973,7 +975,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}) })
} }
pub(super) fn note_internal_mutation_in_method( pub(in super::super) fn note_internal_mutation_in_method(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
expr: &hir::Expr<'_>, expr: &hir::Expr<'_>,
@ -1018,7 +1020,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
} }
pub(super) fn note_need_for_fn_pointer( pub(in super::super) fn note_need_for_fn_pointer(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
expected: Ty<'tcx>, expected: Ty<'tcx>,
@ -1055,7 +1057,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
)); ));
} }
pub(super) fn could_remove_semicolon( pub(in super::super) fn could_remove_semicolon(
&self, &self,
blk: &'tcx hir::Block<'tcx>, blk: &'tcx hir::Block<'tcx>,
expected_ty: Ty<'tcx>, expected_ty: Ty<'tcx>,
@ -1404,7 +1406,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
} }
pub(super) fn with_breakable_ctxt<F: FnOnce() -> R, R>( pub(in super::super) fn with_breakable_ctxt<F: FnOnce() -> R, R>(
&self, &self,
id: hir::HirId, id: hir::HirId,
ctxt: BreakableCtxt<'tcx>, ctxt: BreakableCtxt<'tcx>,
@ -1429,7 +1431,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Instantiate a QueryResponse in a probe context, without a /// Instantiate a QueryResponse in a probe context, without a
/// good ObligationCause. /// good ObligationCause.
pub(super) fn probe_instantiate_query_response( pub(in super::super) fn probe_instantiate_query_response(
&self, &self,
span: Span, span: Span,
original_values: &OriginalQueryValues<'tcx>, original_values: &OriginalQueryValues<'tcx>,
@ -1444,7 +1446,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
/// Returns `true` if an expression is contained inside the LHS of an assignment expression. /// Returns `true` if an expression is contained inside the LHS of an assignment expression.
pub(super) fn expr_in_place(&self, mut expr_id: hir::HirId) -> bool { pub(in super::super) fn expr_in_place(&self, mut expr_id: hir::HirId) -> bool {
let mut contained_in_place = false; let mut contained_in_place = false;
while let hir::Node::Expr(parent_expr) = while let hir::Node::Expr(parent_expr) =

View file

@ -1,12 +1,12 @@
use super::coercion::CoerceMany; use crate::astconv::AstConv;
use super::method::MethodCallee; use crate::check::coercion::CoerceMany;
use super::Expectation::*; use crate::check::method::MethodCallee;
use super::TupleArgumentsFlag::*; use crate::check::Expectation::*;
use super::{ use crate::check::TupleArgumentsFlag::*;
use crate::check::{
potentially_plural_count, struct_span_err, BreakableCtxt, Diverges, Expectation, FnCtxt, potentially_plural_count, struct_span_err, BreakableCtxt, Diverges, Expectation, FnCtxt,
LocalTy, Needs, TupleArgumentsFlag, LocalTy, Needs, TupleArgumentsFlag,
}; };
use crate::astconv::AstConv;
use rustc_ast as ast; use rustc_ast as ast;
use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticId}; use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticId};
@ -26,14 +26,14 @@ use std::mem::replace;
use std::slice; use std::slice;
impl<'a, 'tcx> FnCtxt<'a, 'tcx> { impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
pub(super) fn check_casts(&self) { pub(in super::super) fn check_casts(&self) {
let mut deferred_cast_checks = self.deferred_cast_checks.borrow_mut(); let mut deferred_cast_checks = self.deferred_cast_checks.borrow_mut();
for cast in deferred_cast_checks.drain(..) { for cast in deferred_cast_checks.drain(..) {
cast.check(self); cast.check(self);
} }
} }
pub(super) fn check_method_argument_types( pub(in super::super) fn check_method_argument_types(
&self, &self,
sp: Span, sp: Span,
expr: &'tcx hir::Expr<'tcx>, expr: &'tcx hir::Expr<'tcx>,
@ -90,7 +90,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Generic function that factors out common logic from function calls, /// Generic function that factors out common logic from function calls,
/// method calls and overloaded operators. /// method calls and overloaded operators.
pub(super) fn check_argument_types( pub(in super::super) fn check_argument_types(
&self, &self,
sp: Span, sp: Span,
expr: &'tcx hir::Expr<'tcx>, expr: &'tcx hir::Expr<'tcx>,
@ -377,7 +377,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
// AST fragment checking // AST fragment checking
pub(super) fn check_lit(&self, lit: &hir::Lit, expected: Expectation<'tcx>) -> Ty<'tcx> { pub(in super::super) fn check_lit(
&self,
lit: &hir::Lit,
expected: Expectation<'tcx>,
) -> Ty<'tcx> {
let tcx = self.tcx; let tcx = self.tcx;
match lit.node { match lit.node {
@ -563,7 +567,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
} }
pub(super) fn check_block_with_expected( pub(in super::super) fn check_block_with_expected(
&self, &self,
blk: &'tcx hir::Block<'tcx>, blk: &'tcx hir::Block<'tcx>,
expected: Expectation<'tcx>, expected: Expectation<'tcx>,
@ -692,7 +696,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
ty ty
} }
pub(super) fn check_rustc_args_require_const( pub(in super::super) fn check_rustc_args_require_const(
&self, &self,
def_id: DefId, def_id: DefId,
hir_id: hir::HirId, hir_id: hir::HirId,

View file

@ -1,6 +1,14 @@
use super::coercion::DynamicCoerceMany; mod _impl;
use super::{Diverges, EnclosingBreakables, Inherited, UnsafetyState}; mod checks;
mod suggestions;
pub use _impl::*;
pub use checks::*;
pub use suggestions::*;
use crate::astconv::AstConv; use crate::astconv::AstConv;
use crate::check::coercion::DynamicCoerceMany;
use crate::check::{Diverges, EnclosingBreakables, Inherited, UnsafetyState};
use rustc_hir as hir; use rustc_hir as hir;
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
@ -18,7 +26,6 @@ use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode};
use std::cell::{Cell, RefCell}; use std::cell::{Cell, RefCell};
use std::ops::Deref; use std::ops::Deref;
// The impl for this struct lives in fn_ctxt_impl.rs for file length reasons.
pub struct FnCtxt<'a, 'tcx> { pub struct FnCtxt<'a, 'tcx> {
pub(super) body_id: hir::HirId, pub(super) body_id: hir::HirId,

View file

@ -18,7 +18,11 @@ use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _
use std::iter; use std::iter;
impl<'a, 'tcx> FnCtxt<'a, 'tcx> { impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
pub(super) fn suggest_semicolon_at_end(&self, span: Span, err: &mut DiagnosticBuilder<'_>) { pub(in super::super) fn suggest_semicolon_at_end(
&self,
span: Span,
err: &mut DiagnosticBuilder<'_>,
) {
err.span_suggestion_short( err.span_suggestion_short(
span.shrink_to_hi(), span.shrink_to_hi(),
"consider using a semicolon here", "consider using a semicolon here",
@ -251,7 +255,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// When encountering the expected boxed value allocated in the stack, suggest allocating it /// When encountering the expected boxed value allocated in the stack, suggest allocating it
/// in the heap by calling `Box::new()`. /// in the heap by calling `Box::new()`.
pub(super) fn suggest_boxing_when_appropriate( pub(in super::super) fn suggest_boxing_when_appropriate(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
expr: &hir::Expr<'_>, expr: &hir::Expr<'_>,
@ -286,7 +290,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
/// When encountering an `impl Future` where `BoxFuture` is expected, suggest `Box::pin`. /// When encountering an `impl Future` where `BoxFuture` is expected, suggest `Box::pin`.
pub(super) fn suggest_calling_boxed_future_when_appropriate( pub(in super::super) fn suggest_calling_boxed_future_when_appropriate(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
expr: &hir::Expr<'_>, expr: &hir::Expr<'_>,
@ -381,7 +385,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// This routine checks if the return type is left as default, the method is not part of an /// This routine checks if the return type is left as default, the method is not part of an
/// `impl` block and that it isn't the `main` method. If so, it suggests setting the return /// `impl` block and that it isn't the `main` method. If so, it suggests setting the return
/// type. /// type.
pub(super) fn suggest_missing_return_type( pub(in super::super) fn suggest_missing_return_type(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
fn_decl: &hir::FnDecl<'_>, fn_decl: &hir::FnDecl<'_>,
@ -447,7 +451,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// This routine checks if the found type `T` implements `Future<Output=U>` where `U` is the /// This routine checks if the found type `T` implements `Future<Output=U>` where `U` is the
/// expected type. If this is the case, and we are inside of an async body, it suggests adding /// expected type. If this is the case, and we are inside of an async body, it suggests adding
/// `.await` to the tail of the expression. /// `.await` to the tail of the expression.
pub(super) fn suggest_missing_await( pub(in super::super) fn suggest_missing_await(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
expr: &hir::Expr<'_>, expr: &hir::Expr<'_>,
@ -510,7 +514,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
} }
pub(super) fn suggest_missing_parentheses( pub(in super::super) fn suggest_missing_parentheses(
&self, &self,
err: &mut DiagnosticBuilder<'_>, err: &mut DiagnosticBuilder<'_>,
expr: &hir::Expr<'_>, expr: &hir::Expr<'_>,

View file

@ -76,9 +76,6 @@ pub mod dropck;
mod expectation; mod expectation;
mod expr; mod expr;
mod fn_ctxt; mod fn_ctxt;
mod fn_ctxt_checks;
mod fn_ctxt_impl;
mod fn_ctxt_suggestions;
mod gather_locals; mod gather_locals;
mod generator_interior; mod generator_interior;
mod inherited; mod inherited;
@ -99,10 +96,7 @@ use check::{
pub use check::{check_item_type, check_wf_new}; pub use check::{check_item_type, check_wf_new};
pub use diverges::Diverges; pub use diverges::Diverges;
pub use expectation::Expectation; pub use expectation::Expectation;
pub use fn_ctxt::FnCtxt; pub use fn_ctxt::*;
pub use fn_ctxt_checks::*;
pub use fn_ctxt_impl::*;
pub use fn_ctxt_suggestions::*;
pub use inherited::{Inherited, InheritedBuilder}; pub use inherited::{Inherited, InheritedBuilder};
use crate::astconv::AstConv; use crate::astconv::AstConv;