about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYoshiki Matsuda <myskjp@gmail.com>2022-05-08 11:24:48 +0900
committerYoshiki Matsuda <myskjp@gmail.com>2022-07-02 22:54:37 +0900
commit47c36893a14b689faadeaa06b56e53d36f526c2f (patch)
tree5f86da8b9c732c3a14600127bb648d212e70d2da
parentdcb599fe6c10a21d18f4f5287ef257ee76448864 (diff)
downloadrust-47c36893a14b689faadeaa06b56e53d36f526c2f.tar.gz
rust-47c36893a14b689faadeaa06b56e53d36f526c2f.zip
use &Path instead of AsRef<Path>
-rw-r--r--compiler/rustc_metadata/src/rmeta/encoder.rs6
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);