]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/relate_tys/fn-subtype.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / nll / relate_tys / fn-subtype.rs
1 // Test that NLL produces correct spans for higher-ranked subtyping errors.
2 //
3 // compile-flags:-Zno-leak-check
4
5 fn main() {
6 let x: fn(&'static ()) = |_| {};
7 let y: for<'a> fn(&'a ()) = x; //~ ERROR mismatched types [E0308]
8 }