Skip to content

Commit 7a243b0

Browse files
author
Seiichi Uchida
committed
Update tests
1 parent 38c30a3 commit 7a243b0

File tree

8 files changed

+92
-49
lines changed

8 files changed

+92
-49
lines changed

tests/source/big-impl-rfc.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,17 @@ impl<
112112
> {
113113
fn foo() {}
114114
}
115+
116+
// #1689
117+
impl<M, S, F, X> SubSelectDirect<M, S, F, X>
118+
where
119+
M: select::Selector,
120+
S: event::Stream,
121+
F: for<'t> FnMut(transform::Api<
122+
't,
123+
Stream<ContentStream<S>>,
124+
>)
125+
-> transform::Api<'t, X>,
126+
X: event::Stream,
127+
{
128+
}

tests/target/big-impl-rfc.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,14 @@ impl<
7575
> {
7676
fn foo() {}
7777
}
78+
79+
// #1689
80+
impl<M, S, F, X> SubSelectDirect<M, S, F, X>
81+
where
82+
M: select::Selector,
83+
S: event::Stream,
84+
F: for<'t> FnMut(transform::Api<'t, Stream<ContentStream<S>>>)
85+
-> transform::Api<'t, X>,
86+
X: event::Stream,
87+
{
88+
}

tests/target/extern_not_explicit.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ extern {
66

77
extern fn sup() {}
88

9-
type funky_func = extern fn(unsafe extern "rust-call" fn(*const JSJitInfo,
10-
*mut JSContext,
11-
HandleObject,
12-
*mut libc::c_void,
13-
u32,
14-
*mut JSVal)
15-
-> u8);
9+
type funky_func = extern fn(
10+
unsafe extern "rust-call" fn(
11+
*const JSJitInfo,
12+
*mut JSContext,
13+
HandleObject,
14+
*mut libc::c_void,
15+
u32,
16+
*mut JSVal,
17+
) -> u8,
18+
);

tests/target/fn-simple.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn simple(
1010
key: &[u8],
1111
upd: Box<
1212
Fn(Option<&memcache::Item>)
13-
-> (memcache::Status, Result<memcache::Item, Option<String>>),
13+
-> (memcache::Status, Result<memcache::Item, Option<String>>),
1414
>,
1515
) -> MapResult {
1616
}
@@ -34,15 +34,16 @@ fn weird_comment(
3434

3535
fn generic<T>(arg: T) -> &SomeType
3636
where
37-
T: Fn(// First arg
38-
A,
39-
// Second argument
40-
B,
41-
C,
42-
D,
43-
// pre comment
44-
E /* last comment */)
45-
-> &SomeType,
37+
T: Fn(
38+
// First arg
39+
A,
40+
// Second argument
41+
B,
42+
C,
43+
D,
44+
// pre comment
45+
E, /* last comment */
46+
) -> &SomeType,
4647
{
4748
arg(a, b, c, d, e)
4849
}
@@ -68,13 +69,14 @@ unsafe fn generic_call(
6869
argc: libc::c_uint,
6970
vp: *mut JSVal,
7071
is_lenient: bool,
71-
call: unsafe extern "C" fn(*const JSJitInfo,
72-
*mut JSContext,
73-
HandleObject,
74-
*mut libc::c_void,
75-
u32,
76-
*mut JSVal)
77-
-> u8,
72+
call: unsafe extern "C" fn(
73+
*const JSJitInfo,
74+
*mut JSContext,
75+
HandleObject,
76+
*mut libc::c_void,
77+
u32,
78+
*mut JSVal,
79+
) -> u8,
7880
) {
7981
let f: fn(_, _) -> _ = panic!();
8082
}

tests/target/fn.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ fn foo(a: i32) -> i32 {
102102
fn ______________________baz(
103103
a: i32,
104104
) -> *mut ::std::option::Option<
105-
extern "C" fn(arg1: i32, _____________________a: i32, arg3: i32)
106-
-> (),
105+
extern "C" fn(arg1: i32, _____________________a: i32, arg3: i32) -> (),
107106
> {
108107
}
109108

tests/target/hard-tabs.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,16 @@ fn main() {
5959

6060
fn generic<T>(arg: T) -> &SomeType
6161
where
62-
T: Fn(// First arg
63-
A,
64-
// Second argument
65-
B,
66-
C,
67-
D,
68-
// pre comment
69-
E /* last comment */)
70-
-> &SomeType,
62+
T: Fn(
63+
// First arg
64+
A,
65+
// Second argument
66+
B,
67+
C,
68+
D,
69+
// pre comment
70+
E, /* last comment */
71+
) -> &SomeType,
7172
{
7273
arg(a, b, c, d, e)
7374
}

tests/target/type.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ fn types() {
1313

1414
struct F {
1515
f: extern "C" fn(x: u8, ... /* comment */),
16-
g: extern "C" fn(x: u8,
17-
// comment
18-
...),
16+
g: extern "C" fn(
17+
x: u8,
18+
// comment
19+
...
20+
),
1921
h: extern "C" fn(x: u8, ...),
20-
i: extern "C" fn(x: u8,
21-
// comment 4
22-
y: String, // comment 3
23-
z: Foo,
24-
// comment
25-
... /* comment 2 */),
22+
i: extern "C" fn(
23+
x: u8,
24+
// comment 4
25+
y: String, // comment 3
26+
z: Foo,
27+
// comment
28+
... /* comment 2 */
29+
),
2630
}
2731

2832
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}

tests/target/type_alias.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ pub type LongGenericListTest<
2626

2727
pub type Exactly100CharsTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B> = Vec<i32>;
2828

29-
pub type Exactly101CharsTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B> =
30-
Vec<Test>;
29+
pub type Exactly101CharsTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B> = Vec<
30+
Test,
31+
>;
3132

3233
pub type Exactly100CharsToEqualTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B, C> =
3334
Vec<i32>;
@@ -61,6 +62,14 @@ pub type Exactly100CharstoEqualWhereTest<T, U, PARAMET> where
6162
pub type Exactly101CharstoEqualWhereTest<T, U, PARAMETE> where
6263
T: Clone + Ord + Eq + SomeOtherTrait = Option<T>;
6364

64-
type RegisterPlugin = unsafe fn(pt: *const c_char,
65-
plugin: *mut c_void,
66-
data: *mut CallbackData);
65+
type RegisterPlugin = unsafe fn(pt: *const c_char, plugin: *mut c_void, data: *mut CallbackData);
66+
67+
// #1683
68+
pub type Between<Lhs, Rhs> = super::operators::Between<
69+
Lhs,
70+
super::operators::And<AsExpr<Rhs, Lhs>, AsExpr<Rhs, Lhs>>,
71+
>;
72+
pub type NotBetween<Lhs, Rhs> = super::operators::NotBetween<
73+
Lhs,
74+
super::operators::And<AsExpr<Rhs, Lhs>, AsExpr<Rhs, Lhs>>,
75+
>;

0 commit comments

Comments
 (0)