]> git.lizzy.rs Git - rust.git/blob - src/test/ui/early-vtbl-resolution.rs
Rollup merge of #80398 - CAD97:fix-80365, r=dtolnay
[rust.git] / src / test / ui / early-vtbl-resolution.rs
1 // run-pass
2
3 #![allow(non_camel_case_types)]
4 #![allow(dead_code)]
5 // pretty-expanded FIXME #23616
6
7 trait thing<A> {
8     fn foo(&self) -> Option<A>;
9 }
10 impl<A> thing<A> for isize {
11     fn foo(&self) -> Option<A> { None }
12 }
13 fn foo_func<A, B: thing<A>>(x: B) -> Option<A> { x.foo() }
14
15 struct A { a: isize }
16
17 pub fn main() {
18     let _x: Option<f64> = foo_func(0);
19 }