This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl BoxedResolver {
140
140
let mut generator = Box :: pin ( generator) ;
141
141
142
142
// Run it to the first yield to set it up
143
- let init = match Pin :: new ( & mut generator) . resume ( Action :: Initial ) {
143
+ let init = match generator. as_mut ( ) . resume ( Action :: Initial ) {
144
144
GeneratorState :: Yielded ( YieldType :: Initial ( y) ) => y,
145
145
_ => panic ! ( ) ,
146
146
} ;
@@ -162,7 +162,9 @@ impl BoxedResolver {
162
162
// Get the generator to call our closure
163
163
unsafe {
164
164
// Call the generator, which in turn will call the closure
165
- if let GeneratorState :: Complete ( _) = Pin :: new ( & mut self . generator )
165
+ if let GeneratorState :: Complete ( _) = self
166
+ . generator
167
+ . as_mut ( )
166
168
. resume ( Action :: Access ( AccessAction ( :: std:: mem:: transmute ( mut_f) ) ) )
167
169
{
168
170
panic ! ( )
@@ -175,7 +177,7 @@ impl BoxedResolver {
175
177
176
178
pub fn complete ( mut self ) -> ResolverOutputs {
177
179
// Tell the generator we want it to complete, consuming it and yielding a result
178
- let result = Pin :: new ( & mut self . generator ) . resume ( Action :: Complete ) ;
180
+ let result = self . generator . as_mut ( ) . resume ( Action :: Complete ) ;
179
181
if let GeneratorState :: Complete ( r) = result { r } else { panic ! ( ) }
180
182
}
181
183
You can’t perform that action at this time.
0 commit comments