2 // Test that we can use method notation to call methods based on a
3 // where clause type, and not only type parameters.
10 impl Foo for Option<i32>
12 fn foo(&self) -> i32 {
17 impl Foo for Option<u32>
19 fn foo(&self) -> i32 {
20 self.unwrap_or(22) as i32
24 fn check<T>(x: Option<T>) -> (i32, i32)
27 let y: Option<T> = None;
32 assert_eq!(check(Some(23u32)), (23, 22));
33 assert_eq!(check(Some(23)), (23, 22));