diff options
| author | Ryan1729 <Ryan1729@gmail.com> | 2020-08-02 18:19:33 -0600 |
|---|---|---|
| committer | Ryan1729 <Ryan1729@gmail.com> | 2020-08-06 04:24:24 -0600 |
| commit | ef2916170b62f99411a787e1a1985f45c221ebef (patch) | |
| tree | 97cfa45c24b14e6e32eef470c82e73261f86fc5d | |
| parent | 8244b1b11488a336a485f07fd6550b973009a931 (diff) | |
| download | rust-ef2916170b62f99411a787e1a1985f45c221ebef.tar.gz rust-ef2916170b62f99411a787e1a1985f45c221ebef.zip | |
make parts of rustc_typeck public
| -rw-r--r-- | src/librustc_typeck/check/cast.rs | 4 | ||||
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc_typeck/lib.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_typeck/check/cast.rs b/src/librustc_typeck/check/cast.rs index a877df68326..418ea29b84f 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<CastKind, CastError> { + pub fn do_check(&self, fcx: &FnCtxt<'a, 'tcx>) -> Result<CastKind, CastError> { 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 6cefc99f7b1..3af571417ff 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 9ba2545ba63..4eee4f572c2 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; |
