Skip to content

Commit 5d22359

Browse files
committed
move main
1 parent 430327c commit 5d22359

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

rust/src/main.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
// system packages: rust-all rust-src
22

3+
fn main() {
4+
// to stdout:
5+
print!("output");
6+
println!(" + new line");
7+
// to stderr:
8+
eprint!("error");
9+
eprintln!(" + new line");
10+
}
11+
312
#[test]
413
fn constants() {
514
fn func(arg: i32) -> i32 {
@@ -274,9 +283,3 @@ fn failing_test() {
274283
assert!(false)
275284
}
276285

277-
fn main() {
278-
print!("output");
279-
println!(" + new line");
280-
eprint!("error");
281-
eprintln!(" + new line");
282-
}

0 commit comments

Comments
 (0)