about summary refs log tree commit diff
path: root/tests/ui/rmeta/rmeta_meta_main.rs
blob: 0dfafffe770e747ed96865a9fe15a05099cf9438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ 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.


extern crate rmeta_meta;
use rmeta_meta::Foo;

fn main() {
    let _ = Foo { field2: 42 }; //~ ERROR struct `Foo` has no field named `field2`
}