Created
August 11, 2013 16:45
-
-
Save orenbenkiki/6205631 to your computer and use it in GitHub Desktop.
This file contains 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
mod atom { | |
pub struct Atom { | |
priv id: int, | |
} | |
impl TotalEq for Atom { | |
fn equals(&self, other: &Atom) -> bool { | |
self.id == other.id | |
} | |
} | |
impl Eq for Atom { | |
fn eq(&self, other: &Atom) -> bool { | |
self.id == other.id | |
} | |
fn ne(&self, other: &Atom) -> bool { | |
self.id != other.id | |
} | |
} | |
} |
This file contains 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
#[link(name = "atom", vers = "0.0")] | |
#[comment = "Atom crate"] | |
#[crate_type = "lib"] | |
#[warn(missing_doc)] | |
#[warn(non_camel_case_types)] | |
#[warn(non_uppercase_statics)] | |
#[warn(unnecessary_qualification)] | |
pub mod atom; |
This file contains 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 src/atom/crate.rs | |
src/anthill/atom.rs:3:4: 5:5 warning: missing documentation for a struct | |
src/anthill/atom.rs:3 pub struct Atom { | |
src/anthill/atom.rs:4 priv id: int, | |
src/anthill/atom.rs:5 } | |
src/anthill/crate.rs:4:7: 4:18 note: lint level defined here | |
src/anthill/crate.rs:4 #[warn(missing_doc)] | |
^~~~~~~~~~~ | |
warning: missing crate link meta `name`, using `crate` as default | |
warning: missing crate link meta `vers`, using `0.0` as default | |
So: the crate file is being read, but the link meta data isn't? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem was missing ";" after the attributes. The error messages could be clearer...