File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -194,24 +194,14 @@ fn convert_to_from(
194194 // impl Into<T> for U -> impl Into<T> for T
195195 // ~ ~
196196 ( self_ty. span, into. to_owned( ) ) ,
197- // fn into(self) -> T -> fn from(self) -> T
198- // ~~~~ ~~~~
197+ // fn into(self: U ) -> T -> fn from(self) -> T
198+ // ~~~~ ~~~~
199199 ( impl_item. ident. span, String :: from( "from" ) ) ,
200+ // fn into([mut] self: U) -> T -> fn into([mut] val: T) -> T
201+ // ~~~~~~~ ~~~~~~
202+ ( self_ident. span. to( self_param. ty_span) , format!( "val: {from}" ) ) ,
200203 ] ;
201204
202- if self_ident. span . overlaps ( self_param. ty_span ) {
203- // fn into([mut] self) -> T -> fn into([mut] val: T) -> T
204- // ~~~~ ~~~~~~
205- suggestions. push ( ( self_ident. span , format ! ( "val: {from}" ) ) ) ;
206- } else {
207- // fn into([mut] self: U) -> T -> fn into([mut] val: U) -> T
208- // ~~~~ ~~~
209- suggestions. push ( ( self_ident. span , String :: from ( "val" ) ) ) ;
210- // fn into([mut] val: U) -> T -> fn into([mut] val: T) -> T
211- // ~ ~
212- suggestions. push ( ( self_param. ty_span , from. to_owned ( ) ) ) ;
213- }
214-
215205 if let FnRetTy :: Return ( _) = sig. decl . output {
216206 // fn into(self) -> T -> fn into(self) -> Self
217207 // ~ ~~~~
You can’t perform that action at this time.
0 commit comments