File tree 1 file changed +1
-7
lines changed
compiler/rustc_const_eval/src/transform
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,6 @@ pub struct Candidate {
97
97
location : Location ,
98
98
}
99
99
100
- impl Candidate {
101
- fn source_info ( & self , body : & Body < ' _ > ) -> SourceInfo {
102
- * body. source_info ( self . location )
103
- }
104
- }
105
-
106
100
struct Collector < ' a , ' tcx > {
107
101
ccx : & ' a ConstCx < ' a , ' tcx > ,
108
102
temps : IndexVec < Local , TempState > ,
@@ -969,7 +963,7 @@ pub fn promote_candidates<'tcx>(
969
963
// Declare return place local so that `mir::Body::new` doesn't complain.
970
964
let initial_locals = iter:: once ( LocalDecl :: new ( tcx. types . never , body. span ) ) . collect ( ) ;
971
965
972
- let mut scope = body. source_scopes [ candidate . source_info ( body ) . scope ] . clone ( ) ;
966
+ let mut scope = body. source_scopes [ body . source_info ( candidate . location ) . scope ] . clone ( ) ;
973
967
scope. parent_scope = None ;
974
968
975
969
let promoted = Body :: new (
You can’t perform that action at this time.
0 commit comments