]> git.lizzy.rs Git - rust.git/blob - src/test/ui/higher-rank-trait-bounds/hrtb-precedence-of-plus-where-clause.rs
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
[rust.git] / src / test / ui / higher-rank-trait-bounds / hrtb-precedence-of-plus-where-clause.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
5
6 // Test that `F : Fn(isize) -> isize + Send` is interpreted as two
7 // distinct bounds on `F`.
8
9 fn foo1<F>(f: F)
10     where F : FnOnce(isize) -> isize + Send
11 {
12     bar(f);
13 }
14
15 fn foo2<F>(f: F)
16     where F : FnOnce(isize) -> isize + Send
17 {
18     baz(f);
19 }
20
21 fn bar<F:Send>(f: F) { }
22
23 fn baz<F:FnOnce(isize) -> isize>(f: F) { }
24
25 fn main() {}