]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/normalize-fn-sig.rs
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / 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 }