File tree 4 files changed +46
-0
lines changed
4 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ #[ link( name = "a" , vers = "0.1" ) ] ;
2
+ #[ crate_type = "lib" ] ;
3
+
4
+ iface to_str {
5
+ fn to_str( ) -> str;
6
+ }
7
+
8
+ impl of to_str for str {
9
+ fn to_str ( ) -> str { self }
10
+ }
Original file line number Diff line number Diff line change
1
+ #[ link( name = "b" , vers = "0.1" ) ] ;
2
+ #[ crate_type = "lib" ] ;
3
+
4
+ use a;
5
+ import a:: to_str;
6
+
7
+ impl of to_str for int {
8
+ fn to_str ( ) -> str { #fmt ( "%?" , self ) }
9
+ }
Original file line number Diff line number Diff line change
1
+ #[ link( name = "c" , vers = "0.1" ) ] ;
2
+ #[ crate_type = "lib" ] ;
3
+
4
+ use a;
5
+
6
+ import a:: to_str;
7
+
8
+ impl of to_str for bool {
9
+ fn to_str ( ) -> str { #fmt ( "%b" , self ) }
10
+ }
Original file line number Diff line number Diff line change
1
+ // xfail-test
2
+ // aux-build:issue_2242_a.rs
3
+ // aux-build:issue_2242_b.rs
4
+ // aux-build:issue_2242_c.rs
5
+
6
+ use a;
7
+ use b;
8
+ use c;
9
+
10
+ import b:: to_str;
11
+ import c:: to_str;
12
+
13
+ fn main ( ) {
14
+ io:: println ( "foo" . to_str ( ) ) ;
15
+ io:: println ( 1 . to_str ( ) ) ;
16
+ io:: println ( true . to_str ( ) ) ;
17
+ }
You can’t perform that action at this time.
0 commit comments