Skip to main content

Module location

Module location 

Source
Expand description

Source locations. Every IR node carries a Location for diagnostics: an UnknownLoc, a SourceLoc span in a source, or a CallSiteLoc that pairs a location with its caller’s.

Structs§

CallSiteLoc
The location callee of a node, together with the location caller of the call site it comes from.
CallSiteLocObj
The object behind CallSiteLoc.
Location
Where an IR node comes from, for diagnostics: an UnknownLoc, a SourceLoc or a CallSiteLoc.
LocationObj
The object behind Location.
SourceLoc
The span from start_line, start_column to end_line, end_column in the source source_name, in the line and column numbering of the frontend that produced it.
SourceLocObj
The object behind SourceLoc.
SourceName
The name of a source, such as a file name; SourceName::get returns the shared object for a name.
SourceNameObj
The object behind SourceName.
Unknown
A marker for the unknown location as the loc argument of a constructor: Var::new("x", ty, UNKNOWN_LOC).
UnknownLoc
The location of a node with no source information, a single shared object.
UnknownLocObj
The object behind UnknownLoc.

Constants§

UNKNOWN_LOC
The unknown location, as the loc argument of a constructor.