Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3079bd9

Browse files
committed
Run rustfmt on tests/run-make/.
With the exception of `tests/run-make/translation/test.rs`, which has a syntax error. The expected output in `rustdoc-error-lines/rmake.rs`'s required slight tweaking. The two `reproducible-build.rs` files need `// ignore-tidy-linelength` because rustfmt produces lines longer than 100 chars, which tidy doesn't like, yuk.
1 parent 70bc0c5 commit 3079bd9

File tree

136 files changed

+423
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+423
-372
lines changed

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ignore = [
2020
"/tests/incremental/",
2121
"/tests/mir-opt/",
2222
"/tests/pretty/",
23-
"/tests/run-make/",
23+
"/tests/run-make/translation/test.rs", # Contains syntax errors.
2424
"/tests/run-make-fulldeps/",
2525
"/tests/run-pass-valgrind/",
2626
"/tests/rustdoc/",

tests/run-make/a-b-a-linker-guard/a.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![crate_type = "dylib"]
33

44
#[cfg(x)]
5-
pub fn foo(x: u32) { }
5+
pub fn foo(x: u32) {}
66

77
#[cfg(y)]
8-
pub fn foo(x: i32) { }
8+
pub fn foo(x: i32) {}

tests/run-make/allow-non-lint-warnings-cmdline/foo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#[derive(Copy, Clone)]
33
pub struct Foo;
44

5-
pub fn main() { }
5+
pub fn main() {}

tests/run-make/allow-warnings-cmdline-stability/foo.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
extern crate bar;
44

5-
pub fn main() { bar::baz() }
5+
pub fn main() {
6+
bar::baz()
7+
}

tests/run-make/atomic-lock-free/atomic_lock_free.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(no_core, intrinsics, lang_items)]
2-
#![crate_type="rlib"]
2+
#![crate_type = "rlib"]
33
#![no_core]
44

55
extern "rust-intrinsic" {

tests/run-make/bare-outfile/foo.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
fn main() {
2-
}
1+
fn main() {}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#![crate_type="lib"]
1+
#![crate_type = "lib"]
22
pub struct Foo(());
33

44
impl Foo {
5-
pub fn new() -> Foo {
6-
Foo(())
7-
}
5+
pub fn new() -> Foo {
6+
Foo(())
7+
}
88
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#![crate_type="lib"]
1+
#![crate_type = "lib"]
22
extern crate foo;
33
use foo::Foo;
44

55
pub fn crash() -> Box<Foo> {
6-
Box::new(Foo::new())
6+
Box::new(Foo::new())
77
}

tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#![crate_type = "staticlib"]
22
#![feature(c_variadic)]
33

4-
use std::ffi::{c_char, c_double, c_int, c_long, c_longlong};
54
use std::ffi::VaList;
6-
use std::ffi::{CString, CStr};
5+
use std::ffi::{c_char, c_double, c_int, c_long, c_longlong};
6+
use std::ffi::{CStr, CString};
77

88
macro_rules! continue_if {
99
($cond:expr) => {
1010
if !($cond) {
1111
return 0xff;
1212
}
13-
}
13+
};
1414
}
1515

1616
unsafe fn compare_c_str(ptr: *const c_char, val: &str) -> bool {
@@ -59,13 +59,11 @@ pub unsafe extern "C" fn check_list_copy_0(mut ap: VaList) -> usize {
5959
continue_if!(ap.arg::<c_int>() == 16);
6060
continue_if!(ap.arg::<c_char>() == 'A' as c_char);
6161
continue_if!(compare_c_str(ap.arg::<*const c_char>(), "Skip Me!"));
62-
ap.with_copy(|mut ap| {
63-
if compare_c_str(ap.arg::<*const c_char>(), "Correct") {
64-
0
65-
} else {
66-
0xff
67-
}
68-
})
62+
ap.with_copy(
63+
|mut ap| {
64+
if compare_c_str(ap.arg::<*const c_char>(), "Correct") { 0 } else { 0xff }
65+
},
66+
)
6967
}
7068

7169
#[no_mangle]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#![crate_type = "lib"]
2-
extern crate b;
32
extern crate a;
3+
extern crate b;

0 commit comments

Comments
 (0)