Skip to content

Commit c9219c3

Browse files
committed
added issue link
1 parent a1bd8e8 commit c9219c3

File tree

6 files changed

+36
-31
lines changed

6 files changed

+36
-31
lines changed
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/2288
2+
13
//@ run-pass
24
#![allow(non_camel_case_types)]
35

46
trait clam<A> {
5-
fn chowder(&self, y: A);
7+
fn chowder(&self, y: A);
68
}
79

810
#[derive(Copy, Clone)]
911
struct foo<A> {
10-
x: A,
12+
x: A,
1113
}
1214

1315
impl<A> clam<A> for foo<A> {
14-
fn chowder(&self, _y: A) {
15-
}
16+
fn chowder(&self, _y: A) {}
1617
}
1718

1819
fn foo<A>(b: A) -> foo<A> {
19-
foo {
20-
x: b
21-
}
20+
foo { x: b }
2221
}
2322

2423
fn f<A>(x: Box<dyn clam<A>>, a: A) {
25-
x.chowder(a);
24+
x.chowder(a);
2625
}
2726

2827
pub fn main() {
29-
30-
let c = foo(42);
31-
let d: Box<dyn clam<isize>> = Box::new(c) as Box<dyn clam<isize>>;
32-
f(d, c.x);
28+
let c = foo(42);
29+
let d: Box<dyn clam<isize>> = Box::new(c) as Box<dyn clam<isize>>;
30+
f(d, c.x);
3331
}

tests/ui/extern/lgamma-linkage.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/2214
2+
13
//@ run-pass
24
//@ ignore-wasm32 wasi-libc does not have lgamma
35
//@ ignore-sgx no libc
@@ -19,7 +21,7 @@ mod m {
1921
use std::ffi::{c_double, c_int};
2022
extern "C" {
2123
#[cfg(all(unix, not(target_os = "vxworks")))]
22-
#[link_name="lgamma_r"]
24+
#[link_name = "lgamma_r"]
2325
pub fn lgamma(n: c_double, sign: &mut c_int) -> c_double;
2426
#[cfg(windows)]
2527
#[link_name = "lgamma"]

tests/ui/generics/generic-impl-method-params.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![allow(dead_code)]
33
#![allow(non_camel_case_types)]
44

5-
65
trait clam<A> {
76
fn get(self) -> A;
87
}
@@ -12,15 +11,13 @@ struct foo<A> {
1211
}
1312

1413
impl<A> foo<A> {
15-
pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
16-
panic!();
17-
}
14+
pub fn bar<B, C: clam<A>>(&self, _c: C) -> B {
15+
panic!();
16+
}
1817
}
1918

2019
fn foo<A>(b: A) -> foo<A> {
21-
foo {
22-
x: b
23-
}
20+
foo { x: b }
2421
}
2522

26-
pub fn main() { }
23+
pub fn main() {}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/2311
2+
13
//@ check-pass
24
#![allow(non_camel_case_types)]
35

4-
5-
trait clam<A> { fn get(self) -> A; }
6+
trait clam<A> {
7+
fn get(self) -> A;
8+
}
69
trait foo<A> {
7-
fn bar<B,C:clam<A>>(&self, c: C) -> B;
10+
fn bar<B, C: clam<A>>(&self, c: C) -> B;
811
}
912

10-
pub fn main() { }
13+
pub fn main() {}
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/2312
2+
13
//@ check-pass
24
#![allow(dead_code)]
35
#![allow(non_camel_case_types)]
46

57
// Testing that the B's are resolved
68

7-
8-
trait clam<A> { fn get(self) -> A; }
9+
trait clam<A> {
10+
fn get(self) -> A;
11+
}
912

1013
struct foo(isize);
1114

1215
impl foo {
13-
pub fn bar<B,C:clam<B>>(&self, _c: C) -> B { panic!(); }
16+
pub fn bar<B, C: clam<B>>(&self, _c: C) -> B {
17+
panic!();
18+
}
1419
}
1520

16-
pub fn main() { }
21+
pub fn main() {}

tests/ui/threads-sendsync/recursive-thread-spawn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::thread::Builder;
44

5-
static GENERATIONS: usize = 1024+256+128+49;
5+
static GENERATIONS: usize = 1024 + 256 + 128 + 49;
66

77
fn spawn(mut f: Box<dyn FnMut() + 'static + Send>) {
88
Builder::new().stack_size(32 * 1024).spawn(move || f());
@@ -11,7 +11,7 @@ fn spawn(mut f: Box<dyn FnMut() + 'static + Send>) {
1111
fn child_no(x: usize) -> Box<dyn FnMut() + 'static + Send> {
1212
Box::new(move || {
1313
if x < GENERATIONS {
14-
spawn(child_no(x+1));
14+
spawn(child_no(x + 1));
1515
}
1616
})
1717
}

0 commit comments

Comments
 (0)