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