It is a little bit old, rust has changes a lot:
error: expected one of )
, ,
, .
, ?
, or an operator, found {
--> src/main.rs:120:22
|
120 | spawn(proc() {
| -^ expected one of )
, ,
, .
, ?
, or an operator
| |
| help: missing ,
error: invalid suffix u
for number literal
--> src/main.rs:129:23
|
129 | let mut results = 0u;
| ^^ invalid suffix u
|
= help: the suffix must be one of the numeric types (u32
, isize
, f32
, etc.)
error: invalid suffix u
for number literal
--> src/main.rs:141:25
|
141 | for num in range(0, 9u) {
| ^^ invalid suffix u
|
= help: the suffix must be one of the numeric types (u32
, isize
, f32
, etc.)
error: invalid suffix u
for number literal
--> src/main.rs:149:25
|
149 | for num in range(0, 9u) {
| ^^ invalid suffix u
|
= help: the suffix must be one of the numeric types (u32
, isize
, f32
, etc.)
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:21:24
|
21 | fn n_queens(n: i32) -> uint {
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:23:39
|
23 | return n_queens_helper((1 << n as uint) -1, 0, 0, 0);
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:45:87
|
45 | fn n_queens_helper(all_ones: i32, left_diags: i32, columns: i32, right_diags: i32) -> uint {
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:100:50
|
100 | return solutions + ((columns == all_ones) as uint)
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:108:33
|
108 | fn parallel_n_queens(n: i32) -> uint {
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:109:31
|
109 | let all_ones = (1 << n as uint) - 1;
| ^^^^ not found in this scope
error[E0425]: cannot find function channel
in this scope
--> src/main.rs:115:20
|
115 | let (tx, rx) = channel();
| ^^^^^^^ not found in this scope
|
help: consider importing this function
|
4 | use std::sync::mpsc::channel;
|
error[E0425]: cannot find function spawn
in this scope
--> src/main.rs:120:9
|
120 | spawn(proc() {
| ^^^^^ not found in this scope
|
help: consider importing this function
|
4 | use std::thread::spawn;
|
error[E0425]: cannot find function proc
in this scope
--> src/main.rs:120:15
|
120 | spawn(proc() {
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:130:38
|
130 | for value in rx.iter().take(n as uint) {
| ^^^^ not found in this scope
error[E0412]: cannot find type uint
in this scope
--> src/main.rs:133:48
|
133 | return results + ((columns == all_ones) as uint)
| ^^^^ not found in this scope
error: use of unstable library feature 'test': bench
is a part of custom test frameworks which are unstable
--> src/main.rs:154:3
|
154 | #[bench]
| ^^^^^
|
= note: #[deny(soft_unstable)]
on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #64266 rust-lang/rust#64266
error: use of unstable library feature 'test': bench
is a part of custom test frameworks which are unstable
--> src/main.rs:159:3
|
159 | #[bench]
| ^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #64266 rust-lang/rust#64266
warning: unnecessary parentheses around function argument
--> src/main.rs:90:13
|
90 | (columns | spot),
| ^ ^
|
= note: #[warn(unused_parens)]
on by default
help: remove these parentheses
|
90 - (columns | spot),
90 + columns | spot,
|
warning: unnecessary parentheses around function argument
--> src/main.rs:124:17
|
124 | (columns | spot),
| ^ ^
|
help: remove these parentheses
|
124 - (columns | spot),
124 + columns | spot,
|
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try rustc --explain E0412
.
warning: nqueens
(bin "nqueens") generated 2 warnings
error: could not compile nqueens
due to 17 previous errors; 2 warnings emitted
Thanks,
Jianshu