2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
// Test that `F : Fn(isize) -> isize + Send` is interpreted as two
|
2014-11-25 06:42:16 -06:00
|
|
|
// distinct bounds on `F`.
|
|
|
|
|
2014-11-26 12:21:45 -06:00
|
|
|
fn foo1<F>(f: F)
|
2015-03-25 19:06:52 -05:00
|
|
|
where F : FnOnce(isize) -> isize + Send
|
2014-11-25 06:42:16 -06:00
|
|
|
{
|
|
|
|
bar(f);
|
2014-11-26 12:21:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn foo2<F>(f: F)
|
2015-03-25 19:06:52 -05:00
|
|
|
where F : FnOnce(isize) -> isize + Send
|
2014-11-26 12:21:45 -06:00
|
|
|
{
|
2014-11-25 06:42:16 -06:00
|
|
|
baz(f);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar<F:Send>(f: F) { }
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn baz<F:FnOnce(isize) -> isize>(f: F) { }
|
2014-11-25 06:42:16 -06:00
|
|
|
|
|
|
|
fn main() {}
|