Update tests

This commit is contained in:
Seiichi Uchida 2017-06-18 02:04:03 +09:00
parent 38c30a3e06
commit 4d11faff4b
9 changed files with 96 additions and 49 deletions

View File

@ -112,3 +112,17 @@ impl<
> {
fn foo() {}
}
// #1689
impl<M, S, F, X> SubSelectDirect<M, S, F, X>
where
M: select::Selector,
S: event::Stream,
F: for<'t> FnMut(transform::Api<
't,
Stream<ContentStream<S>>,
>)
-> transform::Api<'t, X>,
X: event::Stream,
{
}

View File

@ -28,3 +28,7 @@ pub type Exactly100CharstoEqualWhereTest<T, U, PARAMET> where T: Clone + Ord + E
pub type Exactly101CharstoEqualWhereTest<T, U, PARAMETE> where T: Clone + Ord + Eq + SomeOtherTrait = Option<T>;
type RegisterPlugin = unsafe fn(pt: *const c_char, plugin: *mut c_void, data: *mut CallbackData);
// #1683
pub type Between<Lhs, Rhs> = super::operators::Between<Lhs, super::operators::And<AsExpr<Rhs, Lhs>, AsExpr<Rhs, Lhs>>>;
pub type NotBetween<Lhs, Rhs> = super::operators::NotBetween<Lhs, super::operators::And<AsExpr<Rhs, Lhs>, AsExpr<Rhs, Lhs>>>;

View File

@ -75,3 +75,14 @@ impl<
> {
fn foo() {}
}
// #1689
impl<M, S, F, X> SubSelectDirect<M, S, F, X>
where
M: select::Selector,
S: event::Stream,
F: for<'t> FnMut(transform::Api<'t, Stream<ContentStream<S>>>)
-> transform::Api<'t, X>,
X: event::Stream,
{
}

View File

@ -6,10 +6,13 @@ extern {
extern fn sup() {}
type funky_func = extern fn(unsafe extern "rust-call" fn(*const JSJitInfo,
*mut JSContext,
HandleObject,
*mut libc::c_void,
u32,
*mut JSVal)
-> u8);
type funky_func = extern fn(
unsafe extern "rust-call" fn(
*const JSJitInfo,
*mut JSContext,
HandleObject,
*mut libc::c_void,
u32,
*mut JSVal,
) -> u8,
);

View File

@ -10,7 +10,7 @@ fn simple(
key: &[u8],
upd: Box<
Fn(Option<&memcache::Item>)
-> (memcache::Status, Result<memcache::Item, Option<String>>),
-> (memcache::Status, Result<memcache::Item, Option<String>>),
>,
) -> MapResult {
}
@ -34,15 +34,16 @@ fn weird_comment(
fn generic<T>(arg: T) -> &SomeType
where
T: Fn(// First arg
A,
// Second argument
B,
C,
D,
// pre comment
E /* last comment */)
-> &SomeType,
T: Fn(
// First arg
A,
// Second argument
B,
C,
D,
// pre comment
E, /* last comment */
) -> &SomeType,
{
arg(a, b, c, d, e)
}
@ -68,13 +69,14 @@ unsafe fn generic_call(
argc: libc::c_uint,
vp: *mut JSVal,
is_lenient: bool,
call: unsafe extern "C" fn(*const JSJitInfo,
*mut JSContext,
HandleObject,
*mut libc::c_void,
u32,
*mut JSVal)
-> u8,
call: unsafe extern "C" fn(
*const JSJitInfo,
*mut JSContext,
HandleObject,
*mut libc::c_void,
u32,
*mut JSVal,
) -> u8,
) {
let f: fn(_, _) -> _ = panic!();
}

View File

@ -102,8 +102,7 @@ fn foo(a: i32) -> i32 {
fn ______________________baz(
a: i32,
) -> *mut ::std::option::Option<
extern "C" fn(arg1: i32, _____________________a: i32, arg3: i32)
-> (),
extern "C" fn(arg1: i32, _____________________a: i32, arg3: i32) -> (),
> {
}

View File

@ -59,15 +59,16 @@ fn main() {
fn generic<T>(arg: T) -> &SomeType
where
T: Fn(// First arg
A,
// Second argument
B,
C,
D,
// pre comment
E /* last comment */)
-> &SomeType,
T: Fn(
// First arg
A,
// Second argument
B,
C,
D,
// pre comment
E, /* last comment */
) -> &SomeType,
{
arg(a, b, c, d, e)
}

View File

@ -13,16 +13,20 @@ fn types() {
struct F {
f: extern "C" fn(x: u8, ... /* comment */),
g: extern "C" fn(x: u8,
// comment
...),
g: extern "C" fn(
x: u8,
// comment
...
),
h: extern "C" fn(x: u8, ...),
i: extern "C" fn(x: u8,
// comment 4
y: String, // comment 3
z: Foo,
// comment
... /* comment 2 */),
i: extern "C" fn(
x: u8,
// comment 4
y: String, // comment 3
z: Foo,
// comment
... /* comment 2 */
),
}
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}

View File

@ -26,8 +26,9 @@ pub type LongGenericListTest<
pub type Exactly100CharsTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B> = Vec<i32>;
pub type Exactly101CharsTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B> =
Vec<Test>;
pub type Exactly101CharsTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B> = Vec<
Test,
>;
pub type Exactly100CharsToEqualTest<'a, 'b, 'c, 'd, LONGPARAMETERNAME, LONGPARAMETERNAME, A, B, C> =
Vec<i32>;
@ -61,6 +62,14 @@ pub type Exactly100CharstoEqualWhereTest<T, U, PARAMET> where
pub type Exactly101CharstoEqualWhereTest<T, U, PARAMETE> where
T: Clone + Ord + Eq + SomeOtherTrait = Option<T>;
type RegisterPlugin = unsafe fn(pt: *const c_char,
plugin: *mut c_void,
data: *mut CallbackData);
type RegisterPlugin = unsafe fn(pt: *const c_char, plugin: *mut c_void, data: *mut CallbackData);
// #1683
pub type Between<Lhs, Rhs> = super::operators::Between<
Lhs,
super::operators::And<AsExpr<Rhs, Lhs>, AsExpr<Rhs, Lhs>>,
>;
pub type NotBetween<Lhs, Rhs> = super::operators::NotBetween<
Lhs,
super::operators::And<AsExpr<Rhs, Lhs>, AsExpr<Rhs, Lhs>>,
>;