2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2018-09-14 05:20:28 -05:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2012-08-20 20:47:16 -05:00
|
|
|
trait thing<A> {
|
2013-03-12 21:32:14 -05:00
|
|
|
fn foo(&self) -> Option<A>;
|
2012-08-20 20:47:16 -05:00
|
|
|
}
|
2015-03-25 19:06:52 -05:00
|
|
|
impl<A> thing<A> for isize {
|
2013-03-12 21:32:14 -05:00
|
|
|
fn foo(&self) -> Option<A> { None }
|
2012-08-20 20:47:16 -05:00
|
|
|
}
|
2012-08-20 14:23:37 -05:00
|
|
|
fn foo_func<A, B: thing<A>>(x: B) -> Option<A> { x.foo() }
|
2012-08-20 20:47:16 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct A { a: isize }
|
2013-01-26 00:46:32 -06:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2015-01-25 15:05:03 -06:00
|
|
|
let _x: Option<f64> = foo_func(0);
|
2012-08-20 20:47:16 -05:00
|
|
|
}
|