sun::borrow_checker
namespace · Source (opens in a new tab)
Checks ownership and lifetimes so references cannot outlive their values.
Classes
- sun::borrow_checker::BorrowChecker (public)
- sun::borrow_checker::BorrowState (public)
- sun::borrow_checker::Lifetime (public)
Structs
- sun::borrow_checker::BorrowError (public)
- sun::borrow_checker::Loan (public)
- sun::borrow_checker::BorrowCheckResult (public)
Functions
buildBorrowCheckError
public · function · Source (opens in a new tab)
SunError sun::borrow_checker::buildBorrowCheckError(const std::vector< BorrowError > &errors)Turn the borrow errors of one compilation into the single error the driver throws.
Combines ownership violations into a compiler error with source context.
The first error gives the message and location; every other error and related borrow rides along as a related diagnostic, so printing the error shows them all with carets and a tool catching it (the language server) can point at each one in the source. Requires a non-empty list.
Related: sun::support::SunError, BorrowError
Enums
BorrowKind
public · enum · Source (opens in a new tab)
enum class sun::borrow_checker::BorrowKindThe kind of borrow - determines what operations are allowed.
Shared
Shared
No documentation comment.
Mutable
Mutable
No documentation comment.