]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/normalize-fn-sig.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / mismatched_types / normalize-fn-sig.rs
1 trait Foo {
2 type Bar;
3 }
4
5 impl<T> Foo for T {
6 type Bar = i32;
7 }
8
9 fn foo<T>(_: <T as Foo>::Bar, _: &'static <T as Foo>::Bar) {}
10
11 fn needs_i32_ref_fn(_: fn(&'static i32, i32)) {}
12
13 fn main() {
14 needs_i32_ref_fn(foo::<()>);
15 //~^ ERROR mismatched types
16 }