diff options
| author | Tshepang Mbambo <tshepang@gmail.com> | 2025-04-28 06:25:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-28 06:25:10 +0200 |
| commit | 1b53c12753a9ecead0e9728e01dcc2a7c07c18f9 (patch) | |
| tree | 87e76fd223f1937ee26537e1028d44e7f6b65544 /compiler/rustc_session/src/utils.rs | |
| parent | d91ffb6da5c306150e53f73a361f69837bc39851 (diff) | |
| parent | aa15830ee2defbac8e784db5510bb914e6e4c820 (diff) | |
| download | rust-1b53c12753a9ecead0e9728e01dcc2a7c07c18f9.tar.gz rust-1b53c12753a9ecead0e9728e01dcc2a7c07c18f9.zip | |
Merge pull request #2358 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
| -rw-r--r-- | compiler/rustc_session/src/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs index 2243e831b66..e9ddd66b5e8 100644 --- a/compiler/rustc_session/src/utils.rs +++ b/compiler/rustc_session/src/utils.rs @@ -1,4 +1,4 @@ -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::sync::OnceLock; use rustc_data_structures::profiling::VerboseTimingGuard; @@ -104,8 +104,8 @@ pub struct CanonicalizedPath { } impl CanonicalizedPath { - pub fn new(path: &Path) -> Self { - Self { original: path.to_owned(), canonicalized: try_canonicalize(path).ok() } + pub fn new(path: PathBuf) -> Self { + Self { canonicalized: try_canonicalize(&path).ok(), original: path } } pub fn canonicalized(&self) -> &PathBuf { |
