Skip to content

Commit 1d23d77

Browse files
committed
make parts of rustc_typeck public
1 parent 8244b1b commit 1d23d77

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/librustc_typeck/check/cast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
147147
}
148148

149149
#[derive(Copy, Clone)]
150-
enum CastError {
150+
pub enum CastError {
151151
ErrorReported,
152152

153153
CastToBool,
@@ -593,7 +593,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
593593
/// Checks a cast, and report an error if one exists. In some cases, this
594594
/// can return Ok and create type errors in the fcx rather than returning
595595
/// directly. coercion-cast is handled in check instead of here.
596-
fn do_check(&self, fcx: &FnCtxt<'a, 'tcx>) -> Result<CastKind, CastError> {
596+
pub fn do_check(&self, fcx: &FnCtxt<'a, 'tcx>) -> Result<CastKind, CastError> {
597597
use rustc_middle::ty::cast::CastTy::*;
598598
use rustc_middle::ty::cast::IntTy::*;
599599

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type parameter).
6767
pub mod _match;
6868
mod autoderef;
6969
mod callee;
70-
mod cast;
70+
pub mod cast;
7171
mod closure;
7272
pub mod coercion;
7373
mod compare_method;

src/librustc_typeck/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ extern crate log;
7474
#[macro_use]
7575
extern crate rustc_middle;
7676

77-
// This is used by Clippy.
77+
// These are used by Clippy.
7878
pub mod expr_use_visitor;
79+
pub mod check;
7980

8081
mod astconv;
81-
mod check;
8282
mod check_unused;
8383
mod coherence;
8484
mod collect;

0 commit comments

Comments
 (0)