Skip to content

Commit 1f406db

Browse files
committed
cleaned up some tests
1 parent eb8da2f commit 1f406db

14 files changed

+29
-17
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/34074>
12
//@ edition: 2015
23
//@ check-pass
34
// Make sure several unnamed function parameters don't conflict with each other
@@ -7,5 +8,4 @@ trait Tr {
78
fn f(u8, u8) {}
89
}
910

10-
fn main() {
11-
}
11+
fn main() {}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/21306>
12
//@ run-pass
23

34
use std::sync::Arc;
45

56
fn main() {
67
let x = 5;
7-
let command = Arc::new(Box::new(|| { x*2 }));
8+
let command = Arc::new(Box::new(|| x * 2));
89
assert_eq!(command(), 10);
910
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/27268>
12
//@ run-pass
23
fn main() {
3-
const _C: &'static dyn Fn() = &||{};
4+
const _C: &'static dyn Fn() = &|| {};
45
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/24161>
12
//@ check-pass
23
#![allow(dead_code)]
3-
#[derive(Copy,Clone)]
4+
#[derive(Copy, Clone)]
45
struct Functions {
56
a: fn(u32) -> u32,
67
b: extern "C" fn(u32) -> u32,
78
c: unsafe fn(u32) -> u32,
8-
d: unsafe extern "C" fn(u32) -> u32
9+
d: unsafe extern "C" fn(u32) -> u32,
910
}
1011

1112
pub fn main() {}

tests/ui/hashmap/hashmap-path-key.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/23036>
12
//@ run-pass
23

34
use std::collections::HashMap;
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/20454>
12
//@ check-pass
23
#![allow(unused_must_use)]
34
use std::thread;
45

56
fn _foo() {
6-
thread::spawn(move || { // no need for -> ()
7+
thread::spawn(move || {
8+
// no need for -> ()
79
loop {
810
println!("hello");
911
}
10-
}).join();
12+
})
13+
.join();
1114
}
1215

1316
fn main() {}

tests/ui/inherent-impls-overlap-check/disjoint-ref-mut-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/19097>
12
//@ check-pass
23
#![allow(dead_code)]
3-
// regression test for #19097
44

55
struct Foo<T>(T);
66

tests/ui/limits/limit-huge-struct-derive-debug.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/29540>
12
//@ build-pass
23
#[derive(Debug)]
34
pub struct Config {

tests/ui/lint/unused/unused-attr-repr-packed-c-order.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/26646>
12
//@ check-pass
23
#![deny(unused_attributes)]
34

@@ -9,4 +10,4 @@ pub struct Foo;
910
#[repr(C)]
1011
pub struct Bar;
1112

12-
fn main() { }
13+
fn main() {}

tests/ui/match/match-usize-min-max-pattern.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/37686>
12
//@ run-pass
23
fn main() {
34
match (0, 0) {

0 commit comments

Comments
 (0)