RealFileName in rustc_span - Rust (original) (raw)
pub enum RealFileName {
LocalPath(PathBuf),
Remapped {
local_path: Option<PathBuf>,
virtual_name: PathBuf,
},
}
For remapped paths (namely paths into libstd that have been mapped to the appropriate spot on the local host’s file system, and local file system paths that have been remapped with FilePathMapping
),
Fields
local_path
is the (host-dependent) local path to the file. This is None if the file was imported from another crate
virtual_name
is the stable path rustc will store internally within build artifacts.
Returns the path suitable for reading from the file system on the local host, if this information exists. Avoid embedding this in build artifacts; see remapped_path_if_available()
for that.
Returns the path suitable for reading from the file system on the local host, if this information exists. Avoid embedding this in build artifacts; see remapped_path_if_available()
for that.
Returns the path suitable for embedding into build artifacts. This would still be a local path if it has not been remapped. A remapped path will not correspond to a valid file system path: see local_path_if_available()
for something that is more likely to return paths into the local host file system.
Returns the path suitable for reading from the file system on the local host, if this information exists. Otherwise returns the remapped name. Avoid embedding this in build artifacts; see remapped_path_if_available()
for that.
Return the path remapped or not depending on the FileNameDisplayPreference.
For the purpose of this function, local and short preference are equal.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes
Size for each variant:
LocalPath
: 32 bytesRemapped
: 48 bytes