Skip to content

Commit c7fed7e

Browse files
committed
Restore warning about local_path() and into_local_path() methods
1 parent 2c966c4 commit c7fed7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_span/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ impl RealFileName {
374374
/// if this information exists.
375375
///
376376
/// May not exists if the filename was imported from another crate.
377+
///
378+
/// Avoid embedding this in build artifacts; prefer `path()` or `embeddable_name()`.
377379
#[inline]
378380
pub fn local_path(&self) -> Option<&Path> {
379381
if !self.was_remapped() {
@@ -387,6 +389,8 @@ impl RealFileName {
387389
/// if this information exists.
388390
///
389391
/// May not exists if the filename was imported from another crate.
392+
///
393+
/// Avoid embedding this in build artifacts; prefer `path()` or `embeddable_name()`.
390394
#[inline]
391395
pub fn into_local_path(self) -> Option<PathBuf> {
392396
if !self.was_remapped() {

0 commit comments

Comments
 (0)