Skip to content

Instantly share code, notes, and snippets.

@SiegeLord
Last active December 22, 2015 10:09
Show Gist options
  • Select an option

  • Save SiegeLord/6457211 to your computer and use it in GitHub Desktop.

Select an option

Save SiegeLord/6457211 to your computer and use it in GitHub Desktop.
Structural variant
rustc --lib test1.rs
warning: missing crate link meta `name`, using `test1` as default
warning: missing crate link meta `vers`, using `0.0` as default
rustc test2.rs -L.
test2.rs:16:10: 16:12 error: `C2` does not name a structure
test2.rs:16 let c2 = C2{a: 0};
^~
error: aborting due to previous error
pub enum B2
{
C2{a: int}
}
extern mod test1;
use test1::*;
pub enum B1
{
C1{a: int}
}
fn main()
{
//let c1 = C1(0);
let c1 = C1{a: 0};
let c2 = C2(0);
let c2 = C2{a: 0};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment