File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,12 @@ impl RegClass {
6161 }
6262}
6363
64- trait ClassList {
64+ trait ClassList for Sized ? {
6565 fn is_pass_byval ( & self ) -> bool ;
6666 fn is_ret_bysret ( & self ) -> bool ;
6767}
6868
69- impl < ' a > ClassList for & ' a [ RegClass ] {
69+ impl ClassList for [ RegClass ] {
7070 fn is_pass_byval ( & self ) -> bool {
7171 if self . len ( ) == 0 { return false ; }
7272
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ use middle::trans::context::CrateContext;
1212use middle:: trans:: type_:: Type ;
1313use llvm:: ValueRef ;
1414
15- pub trait LlvmRepr {
15+ pub trait LlvmRepr for Sized ? {
1616 fn llrepr ( & self , ccx : & CrateContext ) -> String ;
1717}
1818
19- impl < ' a , T : LlvmRepr > LlvmRepr for & ' a [ T ] {
19+ impl < T : LlvmRepr > LlvmRepr for [ T ] {
2020 fn llrepr ( & self , ccx : & CrateContext ) -> String {
2121 let reprs: Vec < String > = self . iter ( ) . map ( |t| t. llrepr ( ccx) ) . collect ( ) ;
2222 format ! ( "[{}]" , reprs. connect( "," ) )
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ use syntax::{ast, ast_util};
3737use syntax:: owned_slice:: OwnedSlice ;
3838
3939/// Produces a string suitable for debugging output.
40- pub trait Repr {
40+ pub trait Repr for Sized ? {
4141 fn repr ( & self , tcx : & ctxt ) -> String ;
4242}
4343
@@ -578,9 +578,9 @@ impl Repr for () {
578578 }
579579}
580580
581- impl < ' a , T : Repr > Repr for & ' a T {
581+ impl < ' a , Sized ? T : Repr > Repr for & ' a T {
582582 fn repr ( & self , tcx : & ctxt ) -> String {
583- ( & * * self ) . repr ( tcx)
583+ Repr :: repr ( * self , tcx)
584584 }
585585}
586586
@@ -600,9 +600,9 @@ fn repr_vec<T:Repr>(tcx: &ctxt, v: &[T]) -> String {
600600 vec_map_to_string ( v, |t| t. repr ( tcx) )
601601}
602602
603- impl < ' a , T : Repr > Repr for & ' a [ T ] {
603+ impl < T : Repr > Repr for [ T ] {
604604 fn repr ( & self , tcx : & ctxt ) -> String {
605- repr_vec ( tcx, * self )
605+ repr_vec ( tcx, self )
606606 }
607607}
608608
You can’t perform that action at this time.
0 commit comments