mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
use &Path instead of AsRef<Path>
This commit is contained in:
parent
dcb599fe6c
commit
47c36893a1
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user