2 // Test that we can use method notation to call methods based on a
3 // projection bound from a trait. Issue #20469.
6 fn make_string(&self) -> String;
9 impl MakeString for isize {
10 fn make_string(&self) -> String {
15 impl MakeString for usize {
16 fn make_string(&self) -> String {
24 fn get(&self) -> &Self::F;
27 fn foo<F:Foo>(f: &F) -> String {
35 impl Foo for SomeStruct {
38 fn get(&self) -> &isize {
43 struct SomeOtherStruct {
47 impl Foo for SomeOtherStruct {
50 fn get(&self) -> &usize {
56 let x = SomeStruct { field: 22 };
57 assert_eq!(foo(&x), format!("22"));
59 let x = SomeOtherStruct { field: 44 };
60 assert_eq!(foo(&x), format!("44"));