diff options
| author | bors <bors@rust-lang.org> | 2016-12-29 11:01:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-29 11:01:11 +0000 |
| commit | e571f2d778c2190ccbfc4cca79af87dbcd27a07f (patch) | |
| tree | a9f3e9e855259802a563f0cfba08bf100ab9c921 /src/test | |
| parent | ebc293bcd3fb4122c9be889b7338a9c3089f53ce (diff) | |
| parent | b059a80d4c3911a9e59d517930ee6928b329cc35 (diff) | |
| download | rust-e571f2d778c2190ccbfc4cca79af87dbcd27a07f.tar.gz rust-e571f2d778c2190ccbfc4cca79af87dbcd27a07f.zip | |
Auto merge of #38571 - nrc:emit-metadata-change, r=alexcrichton
Change --crate-type metadata to --emit=metadata WIP
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/auxiliary/rmeta_meta.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/rmeta-lib-pass.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/rmeta-pass.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/rmeta-priv-warn.rs | 21 | ||||
| -rw-r--r-- | src/test/compile-fail/rmeta.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/rmeta_meta_main.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/auxiliary/rmeta_rmeta.rs | 3 |
7 files changed, 29 insertions, 9 deletions
diff --git a/src/test/compile-fail/auxiliary/rmeta_meta.rs b/src/test/compile-fail/auxiliary/rmeta_meta.rs index 7bd1a96f452..4207fc2373b 100644 --- a/src/test/compile-fail/auxiliary/rmeta_meta.rs +++ b/src/test/compile-fail/auxiliary/rmeta_meta.rs @@ -9,8 +9,9 @@ // except according to those terms. // no-prefer-dynamic +// compile-flags: --emit=metadata -#![crate_type="metadata"] +#![crate_type="rlib"] pub struct Foo { pub field: i32, diff --git a/src/test/compile-fail/rmeta-lib-pass.rs b/src/test/compile-fail/rmeta-lib-pass.rs index f2ac37a2ce9..dde559b018c 100644 --- a/src/test/compile-fail/rmeta-lib-pass.rs +++ b/src/test/compile-fail/rmeta-lib-pass.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// compile-flags: --emit=metadata // aux-build:rmeta_rlib.rs // no-prefer-dynamic // must-compile-successfully @@ -15,8 +16,6 @@ // Check that building a metadata crate works with a dependent, rlib crate. // This is a cfail test since there is no executable to run. -#![crate_type="metadata"] - extern crate rmeta_rlib; use rmeta_rlib::Foo; diff --git a/src/test/compile-fail/rmeta-pass.rs b/src/test/compile-fail/rmeta-pass.rs index 2c0b6f77c1e..5b24da79a7e 100644 --- a/src/test/compile-fail/rmeta-pass.rs +++ b/src/test/compile-fail/rmeta-pass.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// compile-flags: --emit=metadata // aux-build:rmeta_meta.rs // no-prefer-dynamic // must-compile-successfully @@ -16,8 +17,6 @@ // crate. // This is a cfail test since there is no executable to run. -#![crate_type="metadata"] - extern crate rmeta_meta; use rmeta_meta::Foo; diff --git a/src/test/compile-fail/rmeta-priv-warn.rs b/src/test/compile-fail/rmeta-priv-warn.rs new file mode 100644 index 00000000000..3e7019e0ccc --- /dev/null +++ b/src/test/compile-fail/rmeta-priv-warn.rs @@ -0,0 +1,21 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: --emit=metadata +// no-prefer-dynamic +// must-compile-successfully + +#[deny(warnings)] + +// Test that we don't get warnings for non-pub main when only emitting metadata. +// (#38273) + +fn main() { +} diff --git a/src/test/compile-fail/rmeta.rs b/src/test/compile-fail/rmeta.rs index 455574bbb9d..edcf98d9964 100644 --- a/src/test/compile-fail/rmeta.rs +++ b/src/test/compile-fail/rmeta.rs @@ -9,11 +9,10 @@ // except according to those terms. // no-prefer-dynamic +// compile-flags: --emit=metadata // Check that building a metadata crate finds an error. -#![crate_type="metadata"] - fn main() { let _ = Foo; //~ ERROR unresolved value `Foo` } diff --git a/src/test/compile-fail/rmeta_meta_main.rs b/src/test/compile-fail/rmeta_meta_main.rs index 1c922c28139..ffeb5bc3b85 100644 --- a/src/test/compile-fail/rmeta_meta_main.rs +++ b/src/test/compile-fail/rmeta_meta_main.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// compile-flags: --emit=metadata // aux-build:rmeta_meta.rs // no-prefer-dynamic // Check that building a metadata crate finds an error with a dependent, // metadata-only crate. -#![crate_type="metadata"] extern crate rmeta_meta; use rmeta_meta::Foo; diff --git a/src/test/run-pass/auxiliary/rmeta_rmeta.rs b/src/test/run-pass/auxiliary/rmeta_rmeta.rs index 394845b66f3..c3cfe89ee5c 100644 --- a/src/test/run-pass/auxiliary/rmeta_rmeta.rs +++ b/src/test/run-pass/auxiliary/rmeta_rmeta.rs @@ -9,8 +9,9 @@ // except according to those terms. // no-prefer-dynamic +// compile-flags: --emit=metadata -#![crate_type="metadata"] +#![crate_type="rlib"] #![crate_name="rmeta_aux"] pub struct Foo { |
