Last active
December 22, 2015 10:09
-
-
Save SiegeLord/6457211 to your computer and use it in GitHub Desktop.
Structural variant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub enum B2 | |
| { | |
| C2{a: int} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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