]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
1 // Test that the NLL `relate_tys` code correctly deduces that a
2 // function returning always its first argument can be upcast to one
3 // that returns either first or second argument.
6 // compile-flags:-Zno-leak-check
8 fn make_it() -> for<'a
, 'b
> fn(&'a
u32, &'b
u32) -> &'a
u32 {
13 let a
: for<'a
> fn(&'a
u32, &'a
u32) -> &'a
u32 = make_it();