make parts of rustc_typeck public
This commit is contained in:
parent
8244b1b114
commit
ef2916170b
@ -147,7 +147,7 @@ fn pointer_kind(
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
enum CastError {
|
||||
pub enum CastError {
|
||||
ErrorReported,
|
||||
|
||||
CastToBool,
|
||||
@ -593,7 +593,7 @@ fn report_object_unsafe_cast(&self, fcx: &FnCtxt<'a, 'tcx>, did: DefId) {
|
||||
/// 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::*;
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
pub mod _match;
|
||||
mod autoderef;
|
||||
mod callee;
|
||||
mod cast;
|
||||
pub mod cast;
|
||||
mod closure;
|
||||
pub mod coercion;
|
||||
mod compare_method;
|
||||
|
@ -74,11 +74,11 @@
|
||||
#[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;
|
||||
|
Loading…
Reference in New Issue
Block a user