mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00

This already works for --emit=metadata, but is possible anytime we're not linking. Tests: `rmeta_bin` checks we're not changing --emit=link (already passes) `rmeta_bin-pass` tests the new behavior for --emit=obj (would fail today) and also --emit=metadata which isn't changing
15 lines
334 B
Rust
15 lines
334 B
Rust
//@ compile-flags: --emit=obj,metadata --crate-type=bin
|
|
//@ aux-build:rmeta-meta.rs
|
|
//@ no-prefer-dynamic
|
|
//@ build-pass
|
|
|
|
// Check that building a metadata bin crate works with a dependent, metadata
|
|
// crate if linking is not requested.
|
|
|
|
extern crate rmeta_meta;
|
|
use rmeta_meta::Foo;
|
|
|
|
pub fn main() {
|
|
let _ = Foo { field: 42 };
|
|
}
|