Move to new crate rustc_ty.

This commit is contained in:
Camille GILLOT 2020-01-13 13:40:30 +01:00
parent 6d5170c960
commit 9908a87367
6 changed files with 54 additions and 2 deletions

View File

@ -3642,6 +3642,7 @@ dependencies = [
"rustc_span",
"rustc_target",
"rustc_traits",
"rustc_ty",
"rustc_typeck",
"serialize",
"smallvec 1.0.0",
@ -3918,6 +3919,17 @@ dependencies = [
"syntax",
]
[[package]]
name = "rustc_ty"
version = "0.0.0"
dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_hir",
"rustc_span",
]
[[package]]
name = "rustc_typeck"
version = "0.0.0"

View File

@ -39,6 +39,7 @@ rustc_errors = { path = "../librustc_errors" }
rustc_plugin_impl = { path = "../librustc_plugin_impl" }
rustc_privacy = { path = "../librustc_privacy" }
rustc_resolve = { path = "../librustc_resolve" }
rustc_ty = { path = "../librustc_ty" }
tempfile = "3.0.5"
once_cell = "1"

View File

@ -31,7 +31,6 @@ pub mod loops;
mod reachable;
mod region;
pub mod stability;
mod ty;
pub fn provide(providers: &mut Providers<'_>) {
check_const::provide(providers);
@ -44,5 +43,4 @@ pub fn provide(providers: &mut Providers<'_>) {
reachable::provide(providers);
region::provide(providers);
stability::provide(providers);
ty::provide(providers);
}

View File

@ -0,0 +1,16 @@
[package]
authors = ["The Rust Project Developers"]
name = "rustc_ty"
version = "0.0.0"
edition = "2018"
[lib]
name = "rustc_ty"
path = "lib.rs"
[dependencies]
log = "0.4"
rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_hir = { path = "../librustc_hir" }
rustc_span = { path = "../librustc_span" }

25
src/librustc_ty/lib.rs Normal file
View File

@ -0,0 +1,25 @@
//! Various checks
//!
//! # Note
//!
//! This API is completely unstable and subject to change.
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(bool_to_option)]
#![feature(in_band_lifetimes)]
#![feature(nll)]
#![feature(slice_patterns)]
#![recursion_limit = "256"]
#[macro_use]
extern crate rustc;
#[macro_use]
extern crate log;
use rustc::ty::query::Providers;
mod ty;
pub fn provide(providers: &mut Providers<'_>) {
ty::provide(providers);
}