File tree Expand file tree Collapse file tree 4 files changed +26
-428
lines changed
Expand file tree Collapse file tree 4 files changed +26
-428
lines changed Original file line number Diff line number Diff line change @@ -2177,61 +2177,6 @@ fn shared_dep_with_a_build_script() {
21772177 p. cargo ( "build -v" ) . run ( ) ;
21782178}
21792179
2180- #[ cargo_test]
2181- fn transitive_dep_host ( ) {
2182- let p = project ( )
2183- . file (
2184- "Cargo.toml" ,
2185- r#"
2186- [package]
2187- name = "foo"
2188- version = "0.5.0"
2189- edition = "2015"
2190- authors = []
2191- build = "build.rs"
2192-
2193- [build-dependencies.b]
2194- path = "b"
2195- "# ,
2196- )
2197- . file ( "src/lib.rs" , "" )
2198- . file ( "build.rs" , "fn main() {}" )
2199- . file (
2200- "a/Cargo.toml" ,
2201- r#"
2202- [package]
2203- name = "a"
2204- version = "0.5.0"
2205- edition = "2015"
2206- authors = []
2207- links = "foo"
2208- build = "build.rs"
2209- "# ,
2210- )
2211- . file ( "a/build.rs" , "fn main() {}" )
2212- . file ( "a/src/lib.rs" , "" )
2213- . file (
2214- "b/Cargo.toml" ,
2215- r#"
2216- [package]
2217- name = "b"
2218- version = "0.5.0"
2219- edition = "2015"
2220- authors = []
2221-
2222- [lib]
2223- name = "b"
2224- plugin = true
2225-
2226- [dependencies.a]
2227- path = "../a"
2228- "# ,
2229- )
2230- . file ( "b/src/lib.rs" , "" )
2231- . build ( ) ;
2232- p. cargo ( "build" ) . run ( ) ;
2233- }
2234-
22352180#[ cargo_test]
22362181fn test_a_lib_with_a_build_command ( ) {
22372182 let p = project ( )
Original file line number Diff line number Diff line change @@ -883,47 +883,6 @@ fn build_script_only_host() {
883883 p. cargo ( "build -v --target" ) . arg ( & target) . run ( ) ;
884884}
885885
886- #[ cargo_test]
887- fn plugin_build_script_right_arch ( ) {
888- if cross_compile:: disabled ( ) {
889- return ;
890- }
891- let p = project ( )
892- . file (
893- "Cargo.toml" ,
894- r#"
895- [package]
896- name = "foo"
897- version = "0.0.1"
898- edition = "2015"
899- authors = []
900- build = "build.rs"
901-
902- [lib]
903- name = "foo"
904- plugin = true
905- "# ,
906- )
907- . file ( "build.rs" , "fn main() {}" )
908- . file ( "src/lib.rs" , "" )
909- . build ( ) ;
910-
911- p. cargo ( "build -v --target" )
912- . arg ( cross_compile:: alternate ( ) )
913- . with_stderr (
914- "\
915- [WARNING] support for rustc plugins has been removed from rustc. library `foo` should not specify `plugin = true`
916- [WARNING] support for `plugin = true` will be removed from cargo in the future
917- [COMPILING] foo v0.0.1 ([..])
918- [RUNNING] `rustc [..] build.rs [..]`
919- [RUNNING] `[..]/build-script-build`
920- [RUNNING] `rustc [..] src/lib.rs [..]`
921- [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
922- " ,
923- )
924- . run ( ) ;
925- }
926-
927886#[ cargo_test]
928887fn build_script_with_platform_specific_dependencies ( ) {
929888 if cross_compile:: disabled ( ) {
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ fn proc_macro_crate_type_warning() {
346346}
347347
348348#[ cargo_test]
349- fn proc_macro_crate_type_warning_plugin ( ) {
349+ fn lib_plugin_unused_key_warning ( ) {
350350 let foo = project ( )
351351 . file (
352352 "Cargo.toml" ,
@@ -356,26 +356,40 @@ fn proc_macro_crate_type_warning_plugin() {
356356 version = "0.1.0"
357357 edition = "2015"
358358 [lib]
359- crate-type = ["proc-macro"]
360359 plugin = true
361360 "# ,
362361 )
363362 . file ( "src/lib.rs" , "" )
364363 . build ( ) ;
365364
366365 foo. cargo ( "check" )
367- . with_stderr_contains (
368- "[WARNING] support for rustc plugins has been removed from rustc. \
369- library `foo` should not specify `plugin = true`")
370- . with_stderr_contains (
371- "[WARNING] support for `plugin = true` will be removed from cargo in the future" )
372- . with_stderr_contains (
373- "[WARNING] proc-macro library `foo` should not specify `plugin = true`" )
374- . with_stderr_contains (
375- "[WARNING] library `foo` should only specify `proc-macro = true` instead of setting `crate-type`" )
366+ . with_stderr_contains ( "[WARNING] unused manifest key: lib.plugin" )
376367 . run ( ) ;
377368}
378369
370+ #[ cargo_test]
371+ fn proc_macro_crate_type_warning_plugin ( ) {
372+ let foo = project ( )
373+ . file (
374+ "Cargo.toml" ,
375+ r#"
376+ [package]
377+ name = "foo"
378+ version = "0.1.0"
379+ edition = "2015"
380+ [lib]
381+ crate-type = ["proc-macro"]
382+ "# ,
383+ )
384+ . file ( "src/lib.rs" , "" )
385+ . build ( ) ;
386+
387+ foo. cargo ( "check" )
388+ . with_stderr_contains (
389+ "[WARNING] library `foo` should only specify `proc-macro = true` instead of setting `crate-type`" )
390+ . run ( ) ;
391+ }
392+
379393#[ cargo_test]
380394fn proc_macro_crate_type_multiple ( ) {
381395 let foo = project ( )
You can’t perform that action at this time.
0 commit comments