1 #[cfg(test)]
2 mod tests {
3     #[test]
it_worksnull4     fn it_works() {
5         assert_eq!(2 + 2, 4);
6     }
7 }
8 
9 #[derive(Debug)]
10 pub struct Foo {
11     s: &'static str,
12     i: &'static str
13 }
14 
15 impl Foo {
newnull16     pub fn new(s: &'static str) -> Foo {
17         Foo{s: s, i: "bar"}
18     }
19 }
20 
answernull21 pub fn answer() -> i32 {
22   42
23 }