1 // Test that we give a note when the old LUB/GLB algorithm would have
2 // succeeded but the new code (which requires equality) gives an
3 // error. However, now that we handle subtyping correctly, we no
4 // longer get an error, because we recognize these two types as
9 fn foo(x: fn(&u8, &u8), y: for<'a> fn(&'a u8, &'a u8)) {
10 // The two types above are actually equivalent. With the older
11 // leak check, though, we didn't consider them as equivalent, and
12 // hence we gave errors. But now we've fixed that.
19 fn foo_cast(x: fn(&u8, &u8), y: for<'a> fn(&'a u8, &'a u8)) {
21 // No error with an explicit cast:
22 0 => x as for<'a> fn(&'a u8, &'a u8),