Skip to content

Commit f3ca88c

Browse files
committed
Auto merge of #47064 - kennytm:force-trailing-newlines, r=estebank
Add a tidy check for missing or too many trailing newlines. I've noticed recently there are lots of review comments requesting to fix trailing newlines. If this is going to be an official style here, it's better to let the CI do this repetitive check.
2 parents 037bc65 + 4577a70 commit f3ca88c

36 files changed

+34
-48
lines changed

src/liballoc/tests/cow_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ fn check_cow_clone_from() {
148148
let c2: Cow<str> = Cow::Owned(s);
149149
c1.clone_from(&c2);
150150
assert!(c1.into_owned().capacity() >= 25);
151-
}
151+
}

src/libcore/tests/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ fn test_range_inclusive() {
6767
r = RangeInclusive { start: 1, end: -1 };
6868
assert_eq!(r.size_hint(), (0, Some(0)));
6969
assert_eq!(r.next(), None);
70-
}
70+
}

src/libserialize/collection_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,4 @@ impl<T: Decodable> Decodable for Arc<[T]> {
241241
Ok(vec.into())
242242
})
243243
}
244-
}
244+
}

src/test/codegen/prefetch.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,3 @@ pub fn check_prefetch_write_instruction(data: &[i8]) {
7171
prefetch_write_instruction(data.as_ptr(), 3);
7272
}
7373
}
74-
75-

src/test/compile-fail/E0004.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ fn main() {
1919
match x { //~ ERROR E0004
2020
Terminator::TalkToMyHand => {}
2121
}
22-
}
22+
}

src/test/compile-fail/duplicate_entry_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ fn panic_fmt() -> ! {
2020
loop {}
2121
}
2222

23-
fn main() {}
23+
fn main() {}

src/test/compile-fail/float-int-invalid-const-cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ fn main() {
5858
{ const X: u32 = 4294967296. as u32; force(X); } //~ ERROR constant evaluation error
5959
{ const X: u128 = 1e40 as u128; force(X); } //~ ERROR constant evaluation error
6060
{ const X: i128 = 1e40 as i128; force(X); } //~ ERROR constant evaluation error
61-
}
61+
}

src/test/compile-fail/issue-28848.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {
2020
Foo::<'a, 'b>::xmute(u) //~ ERROR lifetime bound not satisfied
2121
}
2222

23-
fn main() {}
23+
fn main() {}

src/test/compile-fail/never-assign-wrong-type.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@
1616
fn main() {
1717
let x: ! = "hello"; //~ ERROR mismatched types
1818
}
19-
20-

src/test/compile-fail/range_inclusive_gate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ pub fn main() {
1919
//~| ERROR core_intrinsics
2020
//~| ERROR core_intrinsics
2121
}
22-
23-

0 commit comments

Comments
 (0)