Skip to content

Commit

Permalink
Auto merge of #12921 - epage:plugins, r=weihanglo
Browse files Browse the repository at this point in the history
tests: Remove plugin tests

Compiler plugins were removed in rust-lang/rust#116412, so we don't need these tests.

As for the `plugin` field on build-targets, it appears to be [stable-but-deprecated](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-plugin-field), so I left it alone
  • Loading branch information
bors committed Nov 6, 2023
2 parents 65e297d + c12c4c3 commit c29e9ef
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 554 deletions.
86 changes: 0 additions & 86 deletions tests/testsuite/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,92 +411,6 @@ fn linker() {
.run();
}

#[cargo_test(nightly, reason = "plugins are unstable")]
fn plugin_with_extra_dylib_dep() {
if cross_compile::disabled() {
return;
}

let foo = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
authors = []
[dependencies.bar]
path = "../bar"
"#,
)
.file(
"src/main.rs",
r#"
#![feature(plugin)]
#![plugin(bar)]
fn main() {}
"#,
)
.build();
let _bar = project()
.at("bar")
.file(
"Cargo.toml",
r#"
[package]
name = "bar"
version = "0.0.1"
authors = []
[lib]
name = "bar"
plugin = true
[dependencies.baz]
path = "../baz"
"#,
)
.file(
"src/lib.rs",
r#"
#![feature(rustc_private)]
extern crate baz;
extern crate rustc_driver;
use rustc_driver::plugin::Registry;
#[no_mangle]
pub fn __rustc_plugin_registrar(reg: &mut Registry) {
println!("{}", baz::baz());
}
"#,
)
.build();
let _baz = project()
.at("baz")
.file(
"Cargo.toml",
r#"
[package]
name = "baz"
version = "0.0.1"
authors = []
[lib]
name = "baz"
crate_type = ["dylib"]
"#,
)
.file("src/lib.rs", "pub fn baz() -> i32 { 1 }")
.build();

let target = cross_compile::alternate();
foo.cargo("build --target").arg(&target).run();
}

#[cargo_test]
fn cross_tests() {
if !cross_compile::can_run_on_host() {
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ mod patch;
mod path;
mod paths;
mod pkgid;
mod plugins;
mod proc_macro;
mod profile_config;
mod profile_custom;
Expand Down
Loading

0 comments on commit c29e9ef

Please sign in to comment.