diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 30092a02cc31e..9f194238c0a65 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -133,8 +133,7 @@ mod boxed_resolver { boxed_resolver.resolver_arenas.as_ref().unwrap(), ), )?; - boxed_resolver.resolver = - Some(std::mem::transmute::, Resolver<'_>>(resolver)); + boxed_resolver.resolver = Some(resolver); Ok((crate_, BoxedResolver(Pin::new_unchecked(boxed_resolver)))) } }