diff options
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index d7991e6a660..7980cb6a132 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -2195,7 +2195,7 @@ impl<D: Decoder> Decodable<D> for EncodedMetadata { } } -pub fn encode_metadata(tcx: TyCtxt<'_>, path: impl AsRef<Path> + Send) { +pub fn encode_metadata(tcx: TyCtxt<'_>, path: &Path) { let _prof_timer = tcx.prof.verbose_generic_activity("generate_crate_metadata"); // Since encoding metadata is not in a query, and nothing is cached, @@ -2216,8 +2216,8 @@ pub fn encode_metadata(tcx: TyCtxt<'_>, path: impl AsRef<Path> + Send) { ); } -fn encode_metadata_impl(tcx: TyCtxt<'_>, path: impl AsRef<Path>) { - let mut encoder = opaque::FileEncoder::new(path.as_ref()) +fn encode_metadata_impl(tcx: TyCtxt<'_>, path: &Path) { + let mut encoder = opaque::FileEncoder::new(path) .unwrap_or_else(|err| tcx.sess.fatal(&format!("failed to create file encoder: {}", err))); encoder.emit_raw_bytes(METADATA_HEADER); |
