Skip to content

Commit c29e9ef

Browse files
committed
Auto merge of #12921 - epage:plugins, r=weihanglo
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
2 parents 65e297d + c12c4c3 commit c29e9ef

File tree

4 files changed

+0
-554
lines changed

4 files changed

+0
-554
lines changed

tests/testsuite/cross_compile.rs

-86
Original file line numberDiff line numberDiff line change
@@ -411,92 +411,6 @@ fn linker() {
411411
.run();
412412
}
413413

414-
#[cargo_test(nightly, reason = "plugins are unstable")]
415-
fn plugin_with_extra_dylib_dep() {
416-
if cross_compile::disabled() {
417-
return;
418-
}
419-
420-
let foo = project()
421-
.file(
422-
"Cargo.toml",
423-
r#"
424-
[package]
425-
name = "foo"
426-
version = "0.0.1"
427-
authors = []
428-
429-
[dependencies.bar]
430-
path = "../bar"
431-
"#,
432-
)
433-
.file(
434-
"src/main.rs",
435-
r#"
436-
#![feature(plugin)]
437-
#![plugin(bar)]
438-
439-
fn main() {}
440-
"#,
441-
)
442-
.build();
443-
let _bar = project()
444-
.at("bar")
445-
.file(
446-
"Cargo.toml",
447-
r#"
448-
[package]
449-
name = "bar"
450-
version = "0.0.1"
451-
authors = []
452-
453-
[lib]
454-
name = "bar"
455-
plugin = true
456-
457-
[dependencies.baz]
458-
path = "../baz"
459-
"#,
460-
)
461-
.file(
462-
"src/lib.rs",
463-
r#"
464-
#![feature(rustc_private)]
465-
466-
extern crate baz;
467-
extern crate rustc_driver;
468-
469-
use rustc_driver::plugin::Registry;
470-
471-
#[no_mangle]
472-
pub fn __rustc_plugin_registrar(reg: &mut Registry) {
473-
println!("{}", baz::baz());
474-
}
475-
"#,
476-
)
477-
.build();
478-
let _baz = project()
479-
.at("baz")
480-
.file(
481-
"Cargo.toml",
482-
r#"
483-
[package]
484-
name = "baz"
485-
version = "0.0.1"
486-
authors = []
487-
488-
[lib]
489-
name = "baz"
490-
crate_type = ["dylib"]
491-
"#,
492-
)
493-
.file("src/lib.rs", "pub fn baz() -> i32 { 1 }")
494-
.build();
495-
496-
let target = cross_compile::alternate();
497-
foo.cargo("build --target").arg(&target).run();
498-
}
499-
500414
#[cargo_test]
501415
fn cross_tests() {
502416
if !cross_compile::can_run_on_host() {

tests/testsuite/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ mod patch;
132132
mod path;
133133
mod paths;
134134
mod pkgid;
135-
mod plugins;
136135
mod proc_macro;
137136
mod profile_config;
138137
mod profile_custom;

0 commit comments

Comments
 (0)