use RustcPublic instead of StableMir
This commit is contained in:
parent
483877a9b2
commit
4d79328091
23 changed files with 28 additions and 28 deletions
|
|
@ -191,7 +191,7 @@ macro_rules! run_driver {
|
|||
use rustc_public::CompilerError;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
pub struct StableMir<B = (), C = (), F = fn($($crate::optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C>>
|
||||
pub struct RustcPublic<B = (), C = (), F = fn($($crate::optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C>>
|
||||
where
|
||||
B: Send,
|
||||
C: Send,
|
||||
|
|
@ -201,15 +201,15 @@ macro_rules! run_driver {
|
|||
result: Option<ControlFlow<B, C>>,
|
||||
}
|
||||
|
||||
impl<B, C, F> StableMir<B, C, F>
|
||||
impl<B, C, F> RustcPublic<B, C, F>
|
||||
where
|
||||
B: Send,
|
||||
C: Send,
|
||||
F: FnOnce($($crate::optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
|
||||
{
|
||||
/// Creates a new `StableMir` instance, with given test_function and arguments.
|
||||
/// Creates a new `RustcPublic` instance, with given test_function and arguments.
|
||||
pub fn new(callback: F) -> Self {
|
||||
StableMir { callback: Some(callback), result: None }
|
||||
RustcPublic { callback: Some(callback), result: None }
|
||||
}
|
||||
|
||||
/// Runs the compiler against given target and tests it with `test_function`
|
||||
|
|
@ -236,7 +236,7 @@ macro_rules! run_driver {
|
|||
}
|
||||
}
|
||||
|
||||
impl<B, C, F> Callbacks for StableMir<B, C, F>
|
||||
impl<B, C, F> Callbacks for RustcPublic<B, C, F>
|
||||
where
|
||||
B: Send,
|
||||
C: Send,
|
||||
|
|
@ -265,6 +265,6 @@ macro_rules! run_driver {
|
|||
}
|
||||
}
|
||||
|
||||
StableMir::new($callback).run($args)
|
||||
RustcPublic::new($callback).run($args)
|
||||
}};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ impl MirVisitor for AdtDefVisitor {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "alloc_input.rs";
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ fn get_item<'a>(
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "alloc_input.rs";
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ fn get_item<'a>(
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "attribute_input.rs";
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ impl<'a> MirVisitor for Visitor<'a> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "binop_input.rs";
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ fn contains<T: CrateDef + std::fmt::Debug>(items: &[T], expected: &[&str]) {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "crate_definitions.rs";
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ fn check_fn_def(ty: Ty) {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "defs_ty_input.rs";
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ fn get_instances(body: mir::Body) -> Vec<Instance> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "defs_input.rs";
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ fn test_foreign() -> ControlFlow<()> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "foreign_input.rs";
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ fn test_body(body: mir::Body) {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "instance_input.rs";
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ impl<'a> MirVisitor for CallsVisitor<'a> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "binop_input.rs";
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ fn test_item_kind() -> ControlFlow<()> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "item_kind_input.rs";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ fn check_ty(ty: Ty) {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "normalization_input.rs";
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ fn assert_impl(impl_names: &HashSet<String>, target: &str) {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "trait_queries.rs";
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ fn get_item<'a>(
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "transform_input.rs";
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ impl<'a> MirVisitor for PlaceVisitor<'a> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "ty_fold_input.rs";
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ fn check_statement_is_aggregate_assign(
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "defs_ty_input.rs";
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use std::io::Write;
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "input_compilation_result_test.rs";
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ fn get_item<'a>(
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "input.rs";
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ fn get_item<'a>(
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "input.rs";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ fn test_translation(tcx: TyCtxt<'_>) -> ControlFlow<()> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "internal_input.rs";
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ fn serialize_to_json(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "internal_input.rs";
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ impl mir::MutMirVisitor for TestMutVisitor {
|
|||
|
||||
/// This test will generate and analyze a dummy crate using the stable mir.
|
||||
/// For that, it will first write the dummy crate into a file.
|
||||
/// Then it will create a `StableMir` using custom arguments and then
|
||||
/// Then it will create a `RustcPublic` using custom arguments and then
|
||||
/// it will run the compiler.
|
||||
fn main() {
|
||||
let path = "sim_visitor_input.rs";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue