pub struct FileId(pub u32);Expand description
A file identifier used to track which source file a span belongs to.
File IDs are indices into a file table maintained by the compiler.
FileId(0) is reserved as the default/unknown file.
Tuple Fields§
§0: u32Implementations§
Source§impl FileId
impl FileId
Sourcepub const DEFAULT: FileId
pub const DEFAULT: FileId
The default file ID, used for single-file compilation or when the file is unknown.
Sourcepub const PRELUDE: FileId
pub const PRELUDE: FileId
File ID reserved for the synthetic compiler prelude (ADR-0065). Always parsed first; used so the prelude has a stable FileId distinct from any user file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileId
impl<'de> Deserialize<'de> for FileId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for FileId
impl Eq for FileId
impl StructuralPartialEq for FileId
Auto Trait Implementations§
impl Freeze for FileId
impl RefUnwindSafe for FileId
impl Send for FileId
impl Sync for FileId
impl Unpin for FileId
impl UnsafeUnpin for FileId
impl UnwindSafe for FileId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more