diff --git a/src/librustc_typeck/check/cast.rs b/src/librustc_typeck/check/cast.rs index a877df68326d..418ea29b84f2 100644 --- a/src/librustc_typeck/check/cast.rs +++ b/src/librustc_typeck/check/cast.rs @@ -147,7 +147,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } #[derive(Copy, Clone)] -enum CastError { +pub enum CastError { ErrorReported, CastToBool, @@ -593,7 +593,7 @@ impl<'a, 'tcx> CastCheck<'tcx> { /// Checks a cast, and report an error if one exists. In some cases, this /// can return Ok and create type errors in the fcx rather than returning /// directly. coercion-cast is handled in check instead of here. - fn do_check(&self, fcx: &FnCtxt<'a, 'tcx>) -> Result { + pub fn do_check(&self, fcx: &FnCtxt<'a, 'tcx>) -> Result { use rustc_middle::ty::cast::CastTy::*; use rustc_middle::ty::cast::IntTy::*; diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 6cefc99f7b17..3af571417ff5 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -67,7 +67,7 @@ type parameter). pub mod _match; mod autoderef; mod callee; -mod cast; +pub mod cast; mod closure; pub mod coercion; mod compare_method; diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 9ba2545ba63c..4eee4f572c2b 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -74,11 +74,11 @@ extern crate log; #[macro_use] extern crate rustc_middle; -// This is used by Clippy. +// These are used by Clippy. pub mod expr_use_visitor; +pub mod check; mod astconv; -mod check; mod check_unused; mod coherence; mod collect;