@@ -31,70 +31,70 @@ pub trait Printer<'tcx>: Sized {
3131 fn tcx < ' a > ( & ' a self ) -> TyCtxt < ' tcx > ;
3232
3333 fn print_def_path (
34- self ,
34+ & mut self ,
3535 def_id : DefId ,
3636 args : & ' tcx [ GenericArg < ' tcx > ] ,
37- ) -> Result < Self , PrintError > {
37+ ) -> Result < ( ) , PrintError > {
3838 self . default_print_def_path ( def_id, args)
3939 }
4040
4141 fn print_impl_path (
42- self ,
42+ & mut self ,
4343 impl_def_id : DefId ,
4444 args : & ' tcx [ GenericArg < ' tcx > ] ,
4545 self_ty : Ty < ' tcx > ,
4646 trait_ref : Option < ty:: TraitRef < ' tcx > > ,
47- ) -> Result < Self , PrintError > {
48- self . default_print_impl_path ( impl_def_id, args, self_ty, trait_ref)
47+ ) -> Result < ( ) , PrintError > {
48+ & mut self . default_print_impl_path ( impl_def_id, args, self_ty, trait_ref)
4949 }
5050
51- fn print_region ( self , region : ty:: Region < ' tcx > ) -> Result < Self , PrintError > ;
51+ fn print_region ( & mut self , region : ty:: Region < ' tcx > ) -> Result < ( ) , PrintError > ;
5252
53- fn print_type ( self , ty : Ty < ' tcx > ) -> Result < Self , PrintError > ;
53+ fn print_type ( & mut self , ty : Ty < ' tcx > ) -> Result < ( ) , PrintError > ;
5454
5555 fn print_dyn_existential (
56- self ,
56+ & mut self ,
5757 predicates : & ' tcx ty:: List < ty:: PolyExistentialPredicate < ' tcx > > ,
58- ) -> Result < Self , PrintError > ;
58+ ) -> Result < ( ) , PrintError > ;
5959
60- fn print_const ( self , ct : ty:: Const < ' tcx > ) -> Result < Self , PrintError > ;
60+ fn print_const ( & mut self , ct : ty:: Const < ' tcx > ) -> Result < ( ) , PrintError > ;
6161
62- fn path_crate ( self , cnum : CrateNum ) -> Result < Self , PrintError > ;
62+ fn path_crate ( & mut self , cnum : CrateNum ) -> Result < ( ) , PrintError > ;
6363
6464 fn path_qualified (
65- self ,
65+ & mut self ,
6666 self_ty : Ty < ' tcx > ,
6767 trait_ref : Option < ty:: TraitRef < ' tcx > > ,
68- ) -> Result < Self , PrintError > ;
68+ ) -> Result < ( ) , PrintError > ;
6969
7070 fn path_append_impl (
71- self ,
72- print_prefix : impl FnOnce ( Self ) -> Result < Self , PrintError > ,
71+ & mut self ,
72+ print_prefix : impl FnOnce ( Self ) -> Result < ( ) , PrintError > ,
7373 disambiguated_data : & DisambiguatedDefPathData ,
7474 self_ty : Ty < ' tcx > ,
7575 trait_ref : Option < ty:: TraitRef < ' tcx > > ,
76- ) -> Result < Self , PrintError > ;
76+ ) -> Result < ( ) , PrintError > ;
7777
7878 fn path_append (
79- self ,
80- print_prefix : impl FnOnce ( Self ) -> Result < Self , PrintError > ,
79+ & mut self ,
80+ print_prefix : impl FnOnce ( Self ) -> Result < ( ) , PrintError > ,
8181 disambiguated_data : & DisambiguatedDefPathData ,
82- ) -> Result < Self , PrintError > ;
82+ ) -> Result < ( ) , PrintError > ;
8383
8484 fn path_generic_args (
85- self ,
86- print_prefix : impl FnOnce ( Self ) -> Result < Self , PrintError > ,
85+ & mut self ,
86+ print_prefix : impl FnOnce ( Self ) -> Result < ( ) , PrintError > ,
8787 args : & [ GenericArg < ' tcx > ] ,
88- ) -> Result < Self , PrintError > ;
88+ ) -> Result < ( ) , PrintError > ;
8989
9090 // Defaults (should not be overridden):
9191
9292 #[ instrument( skip( self ) , level = "debug" ) ]
9393 fn default_print_def_path (
94- self ,
94+ & mut self ,
9595 def_id : DefId ,
9696 args : & ' tcx [ GenericArg < ' tcx > ] ,
97- ) -> Result < Self , PrintError > {
97+ ) -> Result < ( ) , PrintError > {
9898 let key = self . tcx ( ) . def_key ( def_id) ;
9999 debug ! ( ?key) ;
100100
@@ -180,12 +180,12 @@ pub trait Printer<'tcx>: Sized {
180180 }
181181
182182 fn default_print_impl_path (
183- self ,
183+ & mut self ,
184184 impl_def_id : DefId ,
185185 _args : & ' tcx [ GenericArg < ' tcx > ] ,
186186 self_ty : Ty < ' tcx > ,
187187 impl_trait_ref : Option < ty:: TraitRef < ' tcx > > ,
188- ) -> Result < Self , PrintError > {
188+ ) -> Result < ( ) , PrintError > {
189189 debug ! (
190190 "default_print_impl_path: impl_def_id={:?}, self_ty={}, impl_trait_ref={:?}" ,
191191 impl_def_id, self_ty, impl_trait_ref
0 commit comments