Created
January 11, 2014 04:05
-
-
Save etrepum/8366874 to your computer and use it in GitHub Desktop.
Exercism rust exercises
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
$ ./test/rust/check-exercises.sh | |
anagram.rs:5:5: 5:16 error: unresolved import: there is no `sort` in `extra` | |
anagram.rs:5 use extra::sort; | |
^~~~~~~~~~~ | |
anagram.rs:5:5: 5:16 error: failed to resolve import `extra::sort` | |
anagram.rs:5 use extra::sort; | |
^~~~~~~~~~~ | |
error: aborting due to 2 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
beer-song_test.rs:1:1: 1:38 error: obsolete crate `link` attribute | |
beer-song_test.rs:1 #[link(name = "beer", vers = "1.0")]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
note: the link attribute has been superceded by the crate_id attribute, which has the format `#[crate_id = "name#version"]` | |
error: aborting due to previous error | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
bob.rs:13:5: 13:20 error: type `&str` does not implement any method in scope named `iter` | |
bob.rs:13 message.iter().all(|char| !char.is_lowercase()) | |
^~~~~~~~~~~~~~~ | |
bob.rs:13:32: 13:52 error: the type of this value must be known in this context | |
bob.rs:13 message.iter().all(|char| !char.is_lowercase()) | |
^~~~~~~~~~~~~~~~~~~~ | |
error: aborting due to 2 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
school.rs:2:5: 2:16 error: unresolved import: there is no `sort` in `extra` | |
school.rs:2 use extra::sort; | |
^~~~~~~~~~~ | |
school.rs:2:5: 2:16 error: failed to resolve import `extra::sort` | |
school.rs:2 use extra::sort; | |
^~~~~~~~~~~ | |
error: aborting due to 2 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
leap_test.rs:1:1: 1:43 error: obsolete crate `link` attribute | |
leap_test.rs:1 #[link(name = "leap_year", vers = "1.0")]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
note: the link attribute has been superceded by the crate_id attribute, which has the format `#[crate_id = "name#version"]` | |
error: aborting due to previous error | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
dna.rs:4:5: 4:18 error: type `&str` does not implement any method in scope named `iter` | |
dna.rs:4 input.iter().count(|c| c == nucleotide) | |
^~~~~~~~~~~~~ | |
dna.rs:4:28: 4:29 error: the type of this value must be known in this context | |
dna.rs:4 input.iter().count(|c| c == nucleotide) | |
^ | |
dna.rs:8:40: 8:54 error: type `&'static str` does not implement any method in scope named `iter` | |
dna.rs:8 let mut map: HashMap<char, uint> = "ACGT".iter().map(|c| (c, 0)).collect(); | |
^~~~~~~~~~~~~~ | |
dna.rs:9:23: 9:37 error: type `&str` does not implement any method in scope named `iter` | |
dna.rs:9 for nucleotide in input.iter() { | |
^~~~~~~~~~~~~~ | |
error: aborting due to 4 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
phone.rs:4:24: 6:10 error: type `&str` does not implement any method in scope named `iter` | |
phone.rs:4 let digits: ~str = s | |
phone.rs:5 .iter() | |
phone.rs:6 .filter(|&c| char::is_digit_radix(c, 10)) | |
phone.rs:6:18: 6:20 error: the type of this value must be known in this context | |
phone.rs:6 .filter(|&c| char::is_digit_radix(c, 10)) | |
^~ | |
error: aborting due to 2 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
dna.rs:2:5: 2:14 error: type `&str` does not implement any method in scope named `iter` | |
dna.rs:2 a.iter().zip(b.iter()).filter(|&(a, b)| a != b).len() | |
^~~~~~~~~ | |
dna.rs:2:18: 2:27 error: type `&str` does not implement any method in scope named `iter` | |
dna.rs:2 a.iter().zip(b.iter()).filter(|&(a, b)| a != b).len() | |
^~~~~~~~~ | |
dna.rs:2:36: 2:43 error: the type of this value must be known in this context | |
dna.rs:2 a.iter().zip(b.iter()).filter(|&(a, b)| a != b).len() | |
^~~~~~~ | |
error: aborting due to 3 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
rna-transcription_test.rs:10:16: 10:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:10 assert_eq!(dna::RibonucleicAcid::new(~"CGA"), dna::RibonucleicAcid::new(~"CGA")); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:10:5: 10:86 note: expansion site | |
rna-transcription_test.rs:10:51: 10:76 error: static method `new` is inaccessible | |
rna-transcription_test.rs:10 assert_eq!(dna::RibonucleicAcid::new(~"CGA"), dna::RibonucleicAcid::new(~"CGA")); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:10:5: 10:86 note: expansion site | |
rna-transcription_test.rs:11:13: 11:38 error: static method `new` is inaccessible | |
rna-transcription_test.rs:11 assert!(dna::RibonucleicAcid::new(~"CGA") != dna::RibonucleicAcid::new(~"AGC")); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:44:5: 60:6 note: in expansion of assert! | |
rna-transcription_test.rs:11:5: 11:85 note: expansion site | |
rna-transcription_test.rs:11:50: 11:75 error: static method `new` is inaccessible | |
rna-transcription_test.rs:11 assert!(dna::RibonucleicAcid::new(~"CGA") != dna::RibonucleicAcid::new(~"AGC")); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:44:5: 60:6 note: in expansion of assert! | |
rna-transcription_test.rs:11:5: 11:85 note: expansion site | |
rna-transcription_test.rs:16:16: 16:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:16 assert_eq!(dna::RibonucleicAcid::new(~"C"), dna::DeoxyribonucleicAcid::new(~"C").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:16:5: 16:96 note: expansion site | |
rna-transcription_test.rs:16:49: 16:79 error: static method `new` is inaccessible | |
rna-transcription_test.rs:16 assert_eq!(dna::RibonucleicAcid::new(~"C"), dna::DeoxyribonucleicAcid::new(~"C").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:16:5: 16:96 note: expansion site | |
rna-transcription_test.rs:21:16: 21:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:21 assert_eq!(dna::RibonucleicAcid::new(~"G"), dna::DeoxyribonucleicAcid::new(~"G").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:21:5: 21:96 note: expansion site | |
rna-transcription_test.rs:21:49: 21:79 error: static method `new` is inaccessible | |
rna-transcription_test.rs:21 assert_eq!(dna::RibonucleicAcid::new(~"G"), dna::DeoxyribonucleicAcid::new(~"G").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:21:5: 21:96 note: expansion site | |
rna-transcription_test.rs:26:16: 26:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:26 assert_eq!(dna::RibonucleicAcid::new(~"A"), dna::DeoxyribonucleicAcid::new(~"A").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:26:5: 26:96 note: expansion site | |
rna-transcription_test.rs:26:49: 26:79 error: static method `new` is inaccessible | |
rna-transcription_test.rs:26 assert_eq!(dna::RibonucleicAcid::new(~"A"), dna::DeoxyribonucleicAcid::new(~"A").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:26:5: 26:96 note: expansion site | |
rna-transcription_test.rs:31:16: 31:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:31 assert_eq!(dna::RibonucleicAcid::new(~"U"), dna::DeoxyribonucleicAcid::new(~"T").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:31:5: 31:96 note: expansion site | |
rna-transcription_test.rs:31:49: 31:79 error: static method `new` is inaccessible | |
rna-transcription_test.rs:31 assert_eq!(dna::RibonucleicAcid::new(~"U"), dna::DeoxyribonucleicAcid::new(~"T").to_rna()); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:31:5: 31:96 note: expansion site | |
rna-transcription_test.rs:36:16: 36:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:36 assert_eq!(dna::RibonucleicAcid::new(~"ACGUGGUCUUAA"), dna::DeoxyribonucleicAcid::new(~"ACGTGGTCTTAA").to_rna()) | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:36:5: 37:2 note: expansion site | |
rna-transcription_test.rs:36:60: 36:90 error: static method `new` is inaccessible | |
rna-transcription_test.rs:36 assert_eq!(dna::RibonucleicAcid::new(~"ACGUGGUCUUAA"), dna::DeoxyribonucleicAcid::new(~"ACGTGGTCTTAA").to_rna()) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:36:5: 37:2 note: expansion site | |
rna-transcription_test.rs:41:16: 41:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:41 assert_eq!(dna::RibonucleicAcid::new(~"AGC").to_str(), ~"AGC"); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:41:5: 41:68 note: expansion site | |
rna-transcription_test.rs:42:16: 42:41 error: static method `new` is inaccessible | |
rna-transcription_test.rs:42 assert_eq!(dna::RibonucleicAcid::new(~"CGA").to_str(), ~"CGA"); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:62:5: 75:6 note: in expansion of assert_eq! | |
rna-transcription_test.rs:42:5: 42:68 note: expansion site | |
error: aborting due to 16 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
robot-name_test.rs:19:13: 19:34 error: type `&str` does not implement any method in scope named `iter` | |
robot-name_test.rs:19 assert!(n.slice_to(3).iter().all(|c| c >= 'A' && c <= 'Z'), "name starts with 3 letters"); | |
^~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:44:5: 60:6 note: in expansion of assert! | |
robot-name_test.rs:19:5: 19:95 note: expansion site | |
robot-name_test.rs:19:42: 19:43 error: the type of this value must be known in this context | |
robot-name_test.rs:19 assert!(n.slice_to(3).iter().all(|c| c >= 'A' && c <= 'Z'), "name starts with 3 letters"); | |
^ | |
<std-macros>:44:5: 60:6 note: in expansion of assert! | |
robot-name_test.rs:19:5: 19:95 note: expansion site | |
robot-name_test.rs:20:13: 20:36 error: type `&str` does not implement any method in scope named `iter` | |
robot-name_test.rs:20 assert!(n.slice_from(3).iter().all(|c| c >= '0' && c <= '9'), "name ends with 3 numbers"); | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
<std-macros>:44:5: 60:6 note: in expansion of assert! | |
robot-name_test.rs:20:5: 20:95 note: expansion site | |
robot-name_test.rs:20:44: 20:45 error: the type of this value must be known in this context | |
robot-name_test.rs:20 assert!(n.slice_from(3).iter().all(|c| c >= '0' && c <= '9'), "name ends with 3 numbers"); | |
^ | |
<std-macros>:44:5: 60:6 note: in expansion of assert! | |
robot-name_test.rs:20:5: 20:95 note: expansion site | |
error: aborting due to 4 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
word_count.rs:8:17: 8:65 error: type `~str` does not implement any method in scope named `split_iter` | |
word_count.rs:8 for word in norm.split_iter(|c: char| !c.is_alphanumeric()).filter(|s| !s.is_empty()) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
word_count.rs:8:77: 8:90 error: the type of this value must be known in this context | |
word_count.rs:8 for word in norm.split_iter(|c: char| !c.is_alphanumeric()).filter(|s| !s.is_empty()) { | |
^~~~~~~~~~~~~ | |
error: aborting due to 2 previous errors | |
task 'rustc' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/libsyntax/diagnostic.rs:75 | |
task '<main>' failed at 'explicit failure', /private/tmp/rust-R5p2/rust-0.9/src/librustc/lib.rs:453 | |
check failed | |
FAILURES: anagram, beer-song, bob, grade-school, leap, nucleotide-count, phone-number, point-mutations, rna-transcription, robot-name, word-count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment