]> git.proxmox.com Git - rustc.git/blame - src/test/ui/early-vtbl-resolution.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / early-vtbl-resolution.rs
CommitLineData
416331ca
XL
1// run-pass
2
0bf4aa26
XL
3#![allow(non_camel_case_types)]
4#![allow(dead_code)]
c34b1796
AL
5// pretty-expanded FIXME #23616
6
223e47cc
LB
7trait thing<A> {
8 fn foo(&self) -> Option<A>;
9}
c34b1796 10impl<A> thing<A> for isize {
223e47cc
LB
11 fn foo(&self) -> Option<A> { None }
12}
13fn foo_func<A, B: thing<A>>(x: B) -> Option<A> { x.foo() }
14
c34b1796 15struct A { a: isize }
223e47cc
LB
16
17pub fn main() {
85aaf69f 18 let _x: Option<f64> = foo_func(0);
223e47cc 19}