Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 47c3689

Browse files
committed
use &Path instead of AsRef<Path>
1 parent dcb599f commit 47c3689

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,7 +2195,7 @@ impl<D: Decoder> Decodable<D> for EncodedMetadata {
21952195
}
21962196
}
21972197

2198-
pub fn encode_metadata(tcx: TyCtxt<'_>, path: impl AsRef<Path> + Send) {
2198+
pub fn encode_metadata(tcx: TyCtxt<'_>, path: &Path) {
21992199
let _prof_timer = tcx.prof.verbose_generic_activity("generate_crate_metadata");
22002200

22012201
// 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) {
22162216
);
22172217
}
22182218

2219-
fn encode_metadata_impl(tcx: TyCtxt<'_>, path: impl AsRef<Path>) {
2220-
let mut encoder = opaque::FileEncoder::new(path.as_ref())
2219+
fn encode_metadata_impl(tcx: TyCtxt<'_>, path: &Path) {
2220+
let mut encoder = opaque::FileEncoder::new(path)
22212221
.unwrap_or_else(|err| tcx.sess.fatal(&format!("failed to create file encoder: {}", err)));
22222222
encoder.emit_raw_bytes(METADATA_HEADER);
22232223

0 commit comments

Comments
 (0)